_typing.py 971 B

123456789101112131415161718192021222324252627282930
  1. # dialects/_typing.py
  2. # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
  3. # <see AUTHORS file>
  4. #
  5. # This module is part of SQLAlchemy and is released under
  6. # the MIT License: https://www.opensource.org/licenses/mit-license.php
  7. from __future__ import annotations
  8. from typing import Any
  9. from typing import Iterable
  10. from typing import Mapping
  11. from typing import Optional
  12. from typing import Union
  13. from ..sql import roles
  14. from ..sql.base import ColumnCollection
  15. from ..sql.schema import Column
  16. from ..sql.schema import ColumnCollectionConstraint
  17. from ..sql.schema import Index
  18. _OnConflictConstraintT = Union[str, ColumnCollectionConstraint, Index, None]
  19. _OnConflictIndexElementsT = Optional[
  20. Iterable[Union[Column[Any], str, roles.DDLConstraintColumnRole]]
  21. ]
  22. _OnConflictIndexWhereT = Optional[roles.WhereHavingRole]
  23. _OnConflictSetT = Optional[
  24. Union[Mapping[Any, Any], ColumnCollection[Any, Any]]
  25. ]
  26. _OnConflictWhereT = Optional[roles.WhereHavingRole]