o
    "h0                 
   @  s  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddl"m#Z# ddl"m#Z# ddl"m$Z$ ddl"m$Z$ ddlm%Z% dd l&m'Z' dd!l(m)Z) dd"l(m*Z* dd#l(m+Z+ dd$l(m,Z, ergd%d&l-m.Z. d%d'l-m/Z/ d%d(l0m1Z1 d%d)l2m3Z3 dd*lm4Z4 dd+lm5Z5 dd,l6m7Z7 dd-l8m9Z9 dd.l"m:Z: dd/l"m;Z; dd0l"m<Z< dd1l"m=Z= dd2l"m>Z> dd3l"m?Z? dd4l@mAZA dd5l@mBZB dd6lCmDZD dd7lCmEZE dd8lCmFZF ddlCmZG dd9lHmIZI dd:lJmKZK dd;lJmLZL eeeM eeMef f ZNed<d=d>ZOG d?d@ d@eZPG dAdB dBeZQG dCdD dDe+ZRG dEdF dFe+ZSG dGdH dHe+ZTeeMef ZUeeMef ZVeeU ZWeeWeUf ZXeee eUf ZYeeee  eWf ZZeeZeYf Z[eeeMdFee\ ee\ ee\ ee\ ee] f  Z^eYZ_eZZ`e[ZaeedIf ZbeeeM eeM f Zce%eMef Zde)dJ ZeeeeMedKf  Zfe)dL ZgG dMdN dNe,dOdPZhe%eMef ZieeheeMef f ZjG dQdR dRe,ZkG dSdT dTe,ZlG dUdV dVe,ZmG dWdX dXe,ZnG dYdZ dZenZoG d[d\ d\enZpG d]d^ d^enZqG d_d` d`enZrG dadb dbe,ZsG dcdd dde,ZtG dedf dfeZueee\eMf dgf ZveeeM eMf ZwG dhdi dieZxG djdk dkZyG dldm dmZzG dndo doeZ{e{Z|G dpdq dqZ}G drds dsZ~dtS )uz1Define core interfaces used by the engine system.    )annotations)Enum)
ModuleType)Any)	Awaitable)Callable)ClassVar)
Collection)Dict)Iterable)Iterator)List)Mapping)MutableMapping)Optional)Sequence)Set)Tuple)Type)TYPE_CHECKING)TypeVar)Union   )util)EventTarget)Pool)PoolProxiedConnection)Compiled)TypeCompiler)immutabledict)
await_only)Literal)NotRequired)Protocol)	TypedDict   )
Connection)Engine)CursorResult)URL)_ListenerFnType)
dispatcher)StatementError)
Executable)_InsertManyValuesBatch)DDLCompiler)IdentifierPreparer)InsertmanyvaluesSentinelOpts)Linting)SQLCompiler)BindParameter)ClauseElement)Column)DefaultGenerator)
SchemaItem)Integer)_TypeMemoDict)
TypeEngine_Tr   )boundc                   @  s    e Zd ZdZdZdZdZdZdS )
CacheStatsr   r%   r         N)__name__
__module____qualname__	CACHE_HIT
CACHE_MISSCACHING_DISABLEDNO_CACHE_KEYNO_DIALECT_SUPPORT rI   rI   q/var/www/project2/testadmin.ninositsolution.com/venv/lib/python3.10/site-packages/sqlalchemy/engine/interfaces.pyr>   O   s    r>   c                   @      e Zd ZdZdZ	 dZ	 dZdS )ExecuteStylezVindicates the :term:`DBAPI` cursor method that will be used to invoke
    a statement.r   r%   r   N)rA   rB   rC   __doc__EXECUTEEXECUTEMANYINSERTMANYVALUESrI   rI   rI   rJ   rL   W   s    rL   c                   @  sB   e Zd ZU dZdddZdddZdddZdddZded< dS )DBAPIConnectionzprotocol representing a :pep:`249` database connection.

    .. versionadded:: 2.0

    .. seealso::

        `Connection Objects <https://www.python.org/dev/peps/pep-0249/#connection-objects>`_
        - in :pep:`249`

    returnNonec                 C     d S NrI   selfrI   rI   rJ   closey       zDBAPIConnection.closec                 C  rT   rU   rI   rV   rI   rI   rJ   commit{   rY   zDBAPIConnection.commitargsr   kwargsDBAPICursorc                 O  rT   rU   rI   )rW   r[   r\   rI   rI   rJ   cursor}   rY   zDBAPIConnection.cursorc                 C  rT   rU   rI   rV   rI   rI   rJ   rollback   rY   zDBAPIConnection.rollbackbool
autocommitNrR   rS   )r[   r   r\   r   rR   r]   )	rA   rB   rC   rM   rX   rZ   r^   r_   __annotations__rI   rI   rI   rJ   rQ   m   s   
 



rQ   c                   @  s   e Zd ZdZdS )	DBAPITypezprotocol representing a :pep:`249` database type.

    .. versionadded:: 2.0

    .. seealso::

        `Type Objects <https://www.python.org/dev/peps/pep-0249/#type-objects>`_
        - in :pep:`249`

    N)rA   rB   rC   rM   rI   rI   rI   rJ   rd      s    rd   c                   @  s   e Zd ZU dZed2ddZed3ddZded	< ded
< d4ddZ	d5d6ddZ	d7ddZ
d8ddZd9d:ddZd;d d!Zd<d#d$Zd=d&d'Z	d9d>d*d+Zd?d-d.Zd@d0d1ZdS )Ar]   zprotocol representing a :pep:`249` database cursor.

    .. versionadded:: 2.0

    .. seealso::

        `Cursor Objects <https://www.python.org/dev/peps/pep-0249/#cursor-objects>`_
        - in :pep:`249`

    rR   _DBAPICursorDescriptionc                 C     dS )zThe description attribute of the Cursor.

        .. seealso::

            `cursor.description <https://www.python.org/dev/peps/pep-0249/#description>`_
            - in :pep:`249`


        NrI   rV   rI   rI   rJ   description   s   zDBAPICursor.descriptionintc                 C  rT   rU   rI   rV   rI   rI   rJ   rowcount   s   zDBAPICursor.rowcount	arraysize	lastrowidrS   c                 C  rT   rU   rI   rV   rI   rI   rJ   rX      rY   zDBAPICursor.closeN	operationr   
parameters#Optional[_DBAPISingleExecuteParams]c                 C  rT   rU   rI   rW   rl   rm   rI   rI   rJ   execute      zDBAPICursor.execute_DBAPIMultiExecuteParamsc                 C  rT   rU   rI   ro   rI   rI   rJ   executemany   rq   zDBAPICursor.executemanyOptional[Any]c                 C  rT   rU   rI   rV   rI   rI   rJ   fetchone   rY   zDBAPICursor.fetchone.sizeSequence[Any]c                 C  rT   rU   rI   )rW   rv   rI   rI   rJ   	fetchmany   rY   zDBAPICursor.fetchmanyc                 C  rT   rU   rI   rV   rI   rI   rJ   fetchall   rY   zDBAPICursor.fetchallsizesc                 C  rT   rU   rI   )rW   rz   rI   rI   rJ   setinputsizes   rY   zDBAPICursor.setinputsizescolumnc                 C  rT   rU   rI   )rW   rv   r|   rI   rI   rJ   setoutputsize   rY   zDBAPICursor.setoutputsizeprocnamestrc                 C  rT   rU   rI   )rW   r~   rm   rI   rI   rJ   callproc   s   zDBAPICursor.callprocOptional[bool]c                 C  rT   rU   rI   rV   rI   rI   rJ   nextset   rY   zDBAPICursor.nextsetkeyc                 C  rT   rU   rI   )rW   r   rI   rI   rJ   __getattr__   rY   zDBAPICursor.__getattr__)rR   re   )rR   rh   rb   rU   )rl   r   rm   rn   rR   r   )rl   r   rm   rr   rR   r   )rR   rt   ).)rv   rh   rR   rw   )rR   rw   )rz   rw   rR   rS   )rv   r   r|   r   rR   rS   )r~   r   rm   rw   rR   r   )rR   r   )r   r   rR   r   )rA   rB   rC   rM   propertyrg   ri   rc   rX   rp   rs   ru   rx   ry   r{   r}   r   r   r   rI   rI   rI   rJ   r]      s*   
 






r]   r   )qmarknumericnamedformatpyformatnumeric_dollarTypeEngine[Any])SERIALIZABLEzREPEATABLE READzREAD COMMITTEDzREAD UNCOMMITTED
AUTOCOMMITc                   @  s^   e Zd ZU ded< ded< ded< ded< ded	< d
ed< d
ed< d
ed< ded< ded< dS )_CoreKnownExecutionOptionszOptional[CompiledCacheType]compiled_cacher   logging_tokenIsolationLevelisolation_levelr`   no_parametersstream_resultsrh   max_row_buffer	yield_perinsertmanyvalues_page_sizez Optional[SchemaTranslateMapType]schema_translate_mappreserve_rowcountN)rA   rB   rC   rc   rI   rI   rI   rJ   r     s   
 r   F)totalc                   @  s~   e Zd ZU dZded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded	< 	 ded
< 	 ded< 	 ded< 	 ded< 	 ded< dS )ReflectedIdentitya&  represent the reflected IDENTITY structure of a column, corresponding
    to the :class:`_schema.Identity` construct.

    The :class:`.ReflectedIdentity` structure is part of the
    :class:`.ReflectedColumn` structure, which is returned by the
    :meth:`.Inspector.get_columns` method.

    r`   alwayson_nullrh   start	incrementminvaluemaxvalue
nominvalue
nomaxvaluecycleOptional[int]cacheorderNrA   rB   rC   rM   rc   rI   rI   rI   rJ   r     s0   
 	r   c                   @  $   e Zd ZU dZded< 	 ded< dS )ReflectedComputeda%  Represent the reflected elements of a computed column, corresponding
    to the :class:`_schema.Computed` construct.

    The :class:`.ReflectedComputed` structure is part of the
    :class:`.ReflectedColumn` structure, which is returned by the
    :meth:`.Inspector.get_columns` method.

    r   sqltextNotRequired[bool]	persistedNr   rI   rI   rI   rJ   r   H  s   
 	r   c                   @  sj   e Zd ZU dZded< 	 ded< 	 ded< 	 ded	< 	 d
ed< 	 ded< 	 ded< 	 ded< 	 ded< dS )ReflectedColumnzDictionary representing the reflected elements corresponding to
    a :class:`_schema.Column` object.

    The :class:`.ReflectedColumn` structure is returned by the
    :class:`.Inspector.get_columns` method.

    r   namer   typer`   nullableOptional[str]defaultr   autoincrementNotRequired[Optional[str]]commentzNotRequired[ReflectedComputed]computedzNotRequired[ReflectedIdentity]identityNotRequired[Dict[str, Any]]dialect_optionsNr   rI   rI   rI   rJ   r   Z  s(   
 r   c                   @  r   )ReflectedConstraintzDictionary representing the reflected elements corresponding to
    :class:`.Constraint`

    A base class for all constraints
    r   r   r   r   Nr   rI   rI   rI   rJ   r     s   
 r   c                   @  r   )ReflectedCheckConstraintzDictionary representing the reflected elements corresponding to
    :class:`.CheckConstraint`.

    The :class:`.ReflectedCheckConstraint` structure is returned by the
    :meth:`.Inspector.get_check_constraints` method.

    r   r   r   r   Nr   rI   rI   rI   rJ   r        
 r   c                   @  s.   e Zd ZU dZded< 	 ded< 	 ded< dS )	ReflectedUniqueConstraintzDictionary representing the reflected elements corresponding to
    :class:`.UniqueConstraint`.

    The :class:`.ReflectedUniqueConstraint` structure is returned by the
    :meth:`.Inspector.get_unique_constraints` method.

    	List[str]column_namesr   duplicates_indexr   r   Nr   rI   rI   rI   rJ   r     s   
 r   c                   @  r   )ReflectedPrimaryKeyConstraintzDictionary representing the reflected elements corresponding to
    :class:`.PrimaryKeyConstraint`.

    The :class:`.ReflectedPrimaryKeyConstraint` structure is returned by the
    :meth:`.Inspector.get_pk_constraint` method.

    r   constrained_columnsr   r   Nr   rI   rI   rI   rJ   r     r   r   c                   @  sB   e Zd ZU dZded< 	 ded< 	 ded< 	 ded< 	 d	ed
< dS )ReflectedForeignKeyConstraintzDictionary representing the reflected elements corresponding to
    :class:`.ForeignKeyConstraint`.

    The :class:`.ReflectedForeignKeyConstraint` structure is returned by
    the :meth:`.Inspector.get_foreign_keys` method.

    r   r   r   referred_schemar   referred_tablereferred_columnsr   optionsNr   rI   rI   rI   rJ   r     s   
 r   c                   @  s`   e Zd ZU dZded< 	 ded< 	 ded< 	 ded	< 	 d
ed< 	 ded< 	 ded< 	 ded< dS )ReflectedIndexzDictionary representing the reflected elements corresponding to
    :class:`.Index`.

    The :class:`.ReflectedIndex` structure is returned by the
    :meth:`.Inspector.get_indexes` method.

    r   r   zList[Optional[str]]r   zNotRequired[List[str]]expressionsr`   uniquer   duplicates_constraintinclude_columnsz"NotRequired[Dict[str, Tuple[str]]]column_sortingr   r   Nr   rI   rI   rI   rJ   r     s$   
 	r   c                   @     e Zd ZU dZded< dS )ReflectedTableCommentzDictionary representing the reflected comment corresponding to
    the :attr:`_schema.Table.comment` attribute.

    The :class:`.ReflectedTableComment` structure is returned by the
    :meth:`.Inspector.get_table_comment` method.

    r   textNr   rI   rI   rI   rJ   r   &  s   
 r   c                   @  rK   )
BindTypingzDefine different methods of passing typing information for
    bound parameters in a statement to the database driver.

    .. versionadded:: 2.0

    r%   r   r?   N)rA   rB   rC   rM   NONESETINPUTSIZESRENDER_CASTSrI   rI   rI   rJ   r   3  s    r   .c                   @  s  e Zd ZU dZejZejZejZejZej	Z	de
d< de
d< 	 de
d< 	 de
d< de
d	< 	 ejd^ddZde
d< 	 de
d< 	 de
d< de
d< 	 de
d< 	 de
d< 	 de
d< 	 de
d< 	 de
d< 	 de
d < 	 d!e
d"< 	 d#e
d$< 	 d%e
d&< 	 d%e
d'< d(e
d)< 	 d*e
d+< 	 de
d,< 	 d-e
d.< 	 d/e
d0< 	 d/e
d1< 	 de
d2< 	 de
d3< 	 de
d4< 	 de
d5< 	 de
d6< 	 de
d7< 	 de
d8< 	 d9Zde
d:< 	 de
d;< 	 de
d<< 	 de
d=< 	 de
d>< 	 de
d?< 	 de
d@< 	 de
dA< 	 dBe
dC< 	 d-e
dD< 	 d-e
dE< 	 de
dF< 	 de
dG< 	 de
dH< 	 de
dI< 	 de
dJ< 	 de
dK< 	 de
dL< 	 de
dM< 	 de
dN< 	 dOe
dP< 	 de
dQ< 	 de
dR< 	 d-e
dS< 	 de
dT< 	 de
dU< 	 de
dV< 	 de
dW< 	 de
dX< 	 dYZdZe
d[< 	 d\Zd]e
d^< 	 ejZd_e
d`< 	 de
da< 	 de
db< 	 de
dc< 	 ddZdeZde
df< 	 de
dg< 	 ejZ	 de
dh< 	 de
di< 	 dje
dk< 	 d/e
dl< 	 dme
dn< 	 dme
do< 	 de
dp< 	 de
dq< 	 de
dr< 	 de
ds< dte
du< d_dwdxZd`d|d}Zed^d~dZdaddZdbddZerdcddZ	YdddeddZ dYdYddfddZ!	YdddgddZ"dYdYddhddZ#	YdddiddZ$dYdYddjddZ%	YdddkddZ&	YdddkddZ'	YdddkddZ(	YdddkddZ)	YdddkddZ*	YdddkddZ+dlddZ,	YdddmddZ-	YdddnddZ.dYdYddoddZ/	YdddpddZ0dYdYddqddZ1	YdddrddĄZ2dYdYddsddǄZ3	YdddtddʄZ4dYdYddudd̈́Z5	YdddvddЄZ6dYdYddwddӄZ7dxddՄZ8dxddׄZ9	YdddyddلZ:	Ydddzdd܄Z;	Yddd{dd߄Z<d|ddZ=d}ddZ>d~ddZ?dddZ@dddZAdddZBdddZCdddZDdddZEdddZFdddZGdd dZHdddZIdddZJdddZKdd	d
ZLdddZM	e	dddddZN	e	dddddZOdddZPdddZQ	Yddddd ZR	Ydddd"d#ZS	Ydddd$d%ZTdd*d+ZUdd.d/ZVdd1d2ZWdd3d4ZXdd5d6ZYdd9d:ZZdd;d<Z[dd>d?Z\ddAdBZ]ddCdDZ^eddFdGZ_eddHdIZ`eddJdKZaeddNdOZbddPdQZcddTdUZdddVdWZeddYdZZfdd\d]ZgdYS (  Dialectae  Define the behavior of a specific database and DB-API combination.

    Any aspect of metadata definition, SQL query generation,
    execution, result-set handling, or anything else which varies
    between databases is defined under the general category of the
    Dialect.  The Dialect acts as a factory for other
    database-specific object implementations including
    ExecutionContext, Compiled, DefaultGenerator, and TypeEngine.

    .. note:: Third party dialects should not subclass :class:`.Dialect`
       directly.  Instead, subclass :class:`.default.DefaultDialect` or
       descendant class.

    zdispatcher[Dialect]dispatchr   r   driverdialect_descriptionzOptional[ModuleType]dbapirR   r   c                 C     t  )zsame as .dbapi, but is never None; will raise an error if no
        DBAPI was set up.

        .. versionadded:: 2.0

        NotImplementedErrorrV   rI   rI   rJ   loaded_dbapi     zDialect.loaded_dbapir`   
positional
paramstyler2   compiler_lintingzType[SQLCompiler]statement_compilerzType[DDLCompiler]ddl_compilerzClassVar[Type[TypeCompiler]]type_compiler_clsr   type_compiler_instancer   type_compilerzType[IdentifierPreparer]preparerr0   identifier_preparerzOptional[Tuple[Any, ...]]server_version_infor   default_schema_namezOptional[IsolationLevel]default_isolation_level_on_connect_isolation_levelzType[ExecutionContext]execution_ctx_clsz4Union[Type[Tuple[Any, ...]], Type[Tuple[List[Any]]]]execute_sequence_formatsupports_alterrh   max_identifier_lengthr   max_index_name_lengthmax_constraint_name_lengthsupports_server_side_cursorsserver_side_cursorssupports_sane_rowcountsupports_sane_multi_rowcountsupports_empty_insertsupports_default_valuessupports_default_metavalueDEFAULTdefault_metavalue_tokensupports_multivalues_insertinsert_executemany_returning4insert_executemany_returning_sort_by_parameter_orderupdate_executemany_returningdelete_executemany_returninguse_insertmanyvalues!use_insertmanyvalues_wo_returningr1   "insertmanyvalues_implicit_sentinelr   insertmanyvalues_max_parameters"preexecute_autoincrement_sequencesinsert_returningupdate_returningupdate_returning_multifromdelete_returningdelete_returning_multifromfavor_returning_over_lastrowidsupports_identity_columnscte_follows_insertz<MutableMapping[Type[TypeEngine[Any]], Type[TypeEngine[Any]]]colspecssupports_sequencessequences_optionaldefault_sequence_basesupports_native_enumsupports_native_booleansupports_native_decimalsupports_native_uuidreturns_native_bytesNzPOptional[List[Tuple[Type[Union[SchemaItem, ClauseElement]], Mapping[str, Any]]]]construct_argumentsrI   Sequence[str]reflection_optionszMapping[str, str]dbapi_exception_translation_mapsupports_commentsinline_commentssupports_constraint_commentsFTsupports_statement_cache_supports_statement_cacheis_asynchas_terminatezMapping[str, Any]engine_config_typeslabel_lengthzOptional[Set[Any]]include_set_input_sizesexclude_set_input_sizessupports_simple_order_by_labeldiv_is_floordivtuple_in_values_bind_typing_render_castsz.MutableMapping[TypeEngine[Any], _TypeMemoDict]_type_memosOptional[_ListenerFnType]c                 C  r   rU   r   rV   rI   rI   rJ   _builtin_onconnect     zDialect._builtin_onconnecturlr)   ConnectArgsTypec                 C  r   )a  Build DB-API compatible connection arguments.

        Given a :class:`.URL` object, returns a tuple
        consisting of a ``(*args, **kwargs)`` suitable to send directly
        to the dbapi's connect function.   The arguments are sent to the
        :meth:`.Dialect.connect` method which then runs the DBAPI-level
        ``connect()`` function.

        The method typically makes use of the
        :meth:`.URL.translate_connect_args`
        method in order to generate a dictionary of options.

        The default implementation is::

            def create_connect_args(self, url):
                opts = url.translate_connect_args()
                opts.update(url.query)
                return ([], opts)

        :param url: a :class:`.URL` object

        :return: a tuple of ``(*args, **kwargs)`` which will be passed to the
         :meth:`.Dialect.connect` method.

        .. seealso::

            :meth:`.URL.translate_connect_args`

        r   rW   r0  rI   rI   rJ   create_connect_args  s   zDialect.create_connect_argsc                 C  r   )a  Import the DBAPI module that is used by this dialect.

        The Python module object returned here will be assigned as an
        instance variable to a constructed dialect under the name
        ``.dbapi``.

        .. versionchanged:: 2.0  The :meth:`.Dialect.import_dbapi` class
           method is renamed from the previous method ``.Dialect.dbapi()``,
           which would be replaced at dialect instantiation time by the
           DBAPI module itself, thus using the same name in two different ways.
           If a ``.Dialect.dbapi()`` classmethod is present on a third-party
           dialect, it will be used and a deprecation warning will be emitted.

        r   clsrI   rI   rJ   import_dbapi     zDialect.import_dbapitypeobjTypeEngine[_T]c                 C  r   )a4  Transform a generic type to a dialect-specific type.

        Dialect classes will usually use the
        :func:`_types.adapt_type` function in the types module to
        accomplish this.

        The returned result is cached *per dialect class* so can
        contain no dialect-instance state.

        r   )rW   r8  rI   rI   rJ   type_descriptor     zDialect.type_descriptor
connectionr&   rS   c                 C  rf   )a  Called during strategized creation of the dialect with a
        connection.

        Allows dialects to configure options based on server version info or
        other properties.

        The connection passed here is a SQLAlchemy Connection object,
        with full capabilities.

        The initialize() method of the base dialect should be called via
        super().

        .. note:: as of SQLAlchemy 1.4, this method is called **before**
           any :meth:`_engine.Dialect.on_connect` hooks are called.

        NrI   rW   r<  rI   rI   rJ   
initialize  rY   zDialect.initializemethod_namec                 C  rT   rU   rI   )rW   r?  rI   rI   rJ   _overrides_default  rY   zDialect._overrides_default
table_nameschemakwList[ReflectedColumn]c                 K  r   )a  Return information about columns in ``table_name``.

        Given a :class:`_engine.Connection`, a string
        ``table_name``, and an optional string ``schema``, return column
        information as a list of dictionaries
        corresponding to the :class:`.ReflectedColumn` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_columns`.

        r   rW   r<  rA  rB  rC  rI   rI   rJ   get_columns     zDialect.get_columns)rB  filter_namesrH  Optional[Collection[str]]0Iterable[Tuple[TableKey, List[ReflectedColumn]]]c                K  r   )a  Return information about columns in all tables in the
        given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_multi_columns`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rW   r<  rB  rH  rC  rI   rI   rJ   get_multi_columns$     zDialect.get_multi_columnsr   c                 K  r   )a  Return information about the primary key constraint on
        table_name`.

        Given a :class:`_engine.Connection`, a string
        ``table_name``, and an optional string ``schema``, return primary
        key information as a dictionary corresponding to the
        :class:`.ReflectedPrimaryKeyConstraint` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_pk_constraint`.

        r   rE  rI   rI   rJ   get_pk_constraint@  rG  zDialect.get_pk_constraint8Iterable[Tuple[TableKey, ReflectedPrimaryKeyConstraint]]c                K  r   )a  Return information about primary key constraints in
        all tables in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_multi_pk_constraint`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_pk_constraintU     zDialect.get_multi_pk_constraint#List[ReflectedForeignKeyConstraint]c                 K  r   )a  Return information about foreign_keys in ``table_name``.

        Given a :class:`_engine.Connection`, a string
        ``table_name``, and an optional string ``schema``, return foreign
        key information as a list of dicts corresponding to the
        :class:`.ReflectedForeignKeyConstraint` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_foreign_keys`.
        r   rE  rI   rI   rJ   get_foreign_keysp     zDialect.get_foreign_keys>Iterable[Tuple[TableKey, List[ReflectedForeignKeyConstraint]]]c                K  r   )a  Return information about foreign_keys in all tables
        in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_multi_foreign_keys`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_foreign_keys  rM  zDialect.get_multi_foreign_keysr   c                 K  r   )zReturn a list of table names for ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_table_names`.

        r   rW   r<  rB  rC  rI   rI   rJ   get_table_names     
zDialect.get_table_namesc                 K  r   )zReturn a list of temporary table names on the given connection,
        if supported by the underlying backend.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_temp_table_names`.

        r   rW  rI   rI   rJ   get_temp_table_names     zDialect.get_temp_table_namesc                 K  r   )a  Return a list of all non-materialized view names available in the
        database.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_view_names`.

        :param schema: schema name to query, if not the default schema.

        r   rW  rI   rI   rJ   get_view_names     zDialect.get_view_namesc                 K  r   )aF  Return a list of all materialized view names available in the
        database.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_materialized_view_names`.

        :param schema: schema name to query, if not the default schema.

         .. versionadded:: 2.0

        r   rW  rI   rI   rJ   get_materialized_view_names     z#Dialect.get_materialized_view_namesc                 K  r   )a*  Return a list of all sequence names available in the database.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_sequence_names`.

        :param schema: schema name to query, if not the default schema.

        .. versionadded:: 1.4
        r   rW  rI   rI   rJ   get_sequence_names  r]  zDialect.get_sequence_namesc                 K  r   )zReturn a list of temporary view names on the given connection,
        if supported by the underlying backend.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_temp_view_names`.

        r   rW  rI   rI   rJ   get_temp_view_names  r[  zDialect.get_temp_view_namesc                 K  r   )zReturn a list of all schema names available in the database.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_schema_names`.
        r   )rW   r<  rC  rI   rI   rJ   get_schema_names     zDialect.get_schema_names	view_namec                 K  r   )aG  Return plain or materialized view definition.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_view_definition`.

        Given a :class:`_engine.Connection`, a string
        ``view_name``, and an optional string ``schema``, return the view
        definition.
        r   )rW   r<  rd  rB  rC  rI   rI   rJ   get_view_definition     zDialect.get_view_definitionList[ReflectedIndex]c                 K  r   )a  Return information about indexes in ``table_name``.

        Given a :class:`_engine.Connection`, a string
        ``table_name`` and an optional string ``schema``, return index
        information as a list of dictionaries corresponding to the
        :class:`.ReflectedIndex` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_indexes`.
        r   rE  rI   rI   rJ   get_indexes  rT  zDialect.get_indexes/Iterable[Tuple[TableKey, List[ReflectedIndex]]]c                K  r   )a  Return information about indexes in in all tables
        in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_multi_indexes`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_indexes$  rM  zDialect.get_multi_indexesList[ReflectedUniqueConstraint]c                 K  r   )a  Return information about unique constraints in ``table_name``.

        Given a string ``table_name`` and an optional string ``schema``, return
        unique constraint information as a list of dicts corresponding
        to the :class:`.ReflectedUniqueConstraint` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_unique_constraints`.
        r   rE  rI   rI   rJ   get_unique_constraints@  rf  zDialect.get_unique_constraints:Iterable[Tuple[TableKey, List[ReflectedUniqueConstraint]]]c                K  r   )a  Return information about unique constraints in all tables
        in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_multi_unique_constraints`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_unique_constraintsS  rM  z$Dialect.get_multi_unique_constraintsList[ReflectedCheckConstraint]c                 K  r   )a  Return information about check constraints in ``table_name``.

        Given a string ``table_name`` and an optional string ``schema``, return
        check constraint information as a list of dicts corresponding
        to the :class:`.ReflectedCheckConstraint` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_check_constraints`.

        r   rE  rI   rI   rJ   get_check_constraintso  rT  zDialect.get_check_constraints9Iterable[Tuple[TableKey, List[ReflectedCheckConstraint]]]c                K  r   )a  Return information about check constraints in all tables
        in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_multi_check_constraints`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_check_constraints  rM  z#Dialect.get_multi_check_constraintsDict[str, Any]c                 K  r   )zReturn a dictionary of options specified when ``table_name``
        was created.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_table_options`.
        r   rE  rI   rI   rJ   get_table_options  r]  zDialect.get_table_options)Iterable[Tuple[TableKey, Dict[str, Any]]]c                K  r   )a  Return a dictionary of options specified when the tables in the
        given schema were created.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_multi_table_options`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_table_options  rQ  zDialect.get_multi_table_optionsr   c                 K  r   )a  Return the "comment" for the table identified by ``table_name``.

        Given a string ``table_name`` and an optional string ``schema``, return
        table comment information as a dictionary corresponding to the
        :class:`.ReflectedTableComment` dictionary.

        This is an internal dialect method. Applications should use
        :meth:`.Inspector.get_table_comment`.

        :raise: ``NotImplementedError`` for dialects that don't support
         comments.

        .. versionadded:: 1.2

        r   rE  rI   rI   rJ   get_table_comment  s   zDialect.get_table_comment0Iterable[Tuple[TableKey, ReflectedTableComment]]c                K  r   )a  Return information about the table comment in all tables
        in the given ``schema``.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.get_multi_table_comment`.

        .. note:: The :class:`_engine.DefaultDialect` provides a default
          implementation that will call the single table method for
          each object returned by :meth:`Dialect.get_table_names`,
          :meth:`Dialect.get_view_names` or
          :meth:`Dialect.get_materialized_view_names` depending on the
          provided ``kind``. Dialects that want to support a faster
          implementation should implement this method.

        .. versionadded:: 2.0

        r   rK  rI   rI   rJ   get_multi_table_comment  rM  zDialect.get_multi_table_commentc                 C  r   )zconvert the given name to lowercase if it is detected as
        case insensitive.

        This method is only used if the dialect defines
        requires_name_normalize=True.

        r   rW   r   rI   rI   rJ   normalize_name  r   zDialect.normalize_namec                 C  r   )zconvert the given name to a case insensitive identifier
        for the backend if it is an all-lowercase name.

        This method is only used if the dialect defines
        requires_name_normalize=True.

        r   rz  rI   rI   rJ   denormalize_name  r   zDialect.denormalize_namec                 K  r   )a  For internal dialect use, check the existence of a particular table
        or view in the database.

        Given a :class:`_engine.Connection` object, a string table_name and
        optional schema name, return True if the given table exists in the
        database, False otherwise.

        This method serves as the underlying implementation of the
        public facing :meth:`.Inspector.has_table` method, and is also used
        internally to implement the "checkfirst" behavior for methods like
        :meth:`_schema.Table.create` and :meth:`_schema.MetaData.create_all`.

        .. note:: This method is used internally by SQLAlchemy, and is
           published so that third-party dialects may provide an
           implementation. It is **not** the public API for checking for table
           presence. Please use the :meth:`.Inspector.has_table` method.

        .. versionchanged:: 2.0:: :meth:`_engine.Dialect.has_table` now
           formally supports checking for additional table-like objects:

           * any type of views (plain or materialized)
           * temporary tables of any kind

           Previously, these two checks were not formally specified and
           different dialects would vary in their behavior.   The dialect
           testing suite now includes tests for all of these object types,
           and dialects to the degree that the backing database supports views
           or temporary tables should seek to support locating these objects
           for full compliance.

        r   rE  rI   rI   rJ   	has_table  s   'zDialect.has_table
index_namec                 K  r   )a  Check the existence of a particular index name in the database.

        Given a :class:`_engine.Connection` object, a string
        ``table_name`` and string index name, return ``True`` if an index of
        the given name on the given table exists, ``False`` otherwise.

        The :class:`.DefaultDialect` implements this in terms of the
        :meth:`.Dialect.has_table` and :meth:`.Dialect.get_indexes` methods,
        however dialects can implement a more performant version.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.has_index`.

        .. versionadded:: 1.4

        r   )rW   r<  rA  r~  rB  rC  rI   rI   rJ   	has_index;  rQ  zDialect.has_indexsequence_namec                 K  r   )ap  Check the existence of a particular sequence in the database.

        Given a :class:`_engine.Connection` object and a string
        `sequence_name`, return ``True`` if the given sequence exists in
        the database, ``False`` otherwise.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.has_sequence`.
        r   )rW   r<  r  rB  rC  rI   rI   rJ   has_sequenceV  rf  zDialect.has_sequenceschema_namec                 K  r   )av  Check the existence of a particular schema name in the database.

        Given a :class:`_engine.Connection` object, a string
        ``schema_name``, return ``True`` if a schema of the
        given exists, ``False`` otherwise.

        The :class:`.DefaultDialect` implements this by checking
        the presence of ``schema_name`` among the schemas returned by
        :meth:`.Dialect.get_schema_names`,
        however dialects can implement a more performant version.

        This is an internal dialect method. Applications should use
        :meth:`_engine.Inspector.has_schema`.

        .. versionadded:: 2.0

        r   )rW   r<  r  rC  rI   rI   rJ   
has_schemai  s   zDialect.has_schemac                 C  r   )zRetrieve the server version info from the given connection.

        This is used by the default implementation to populate the
        "server_version_info" attribute and is called exactly
        once upon first connect.

        r   r=  rI   rI   rJ   _get_server_version_info     	z Dialect._get_server_version_infoc                 C  r   )a  Return the string name of the currently selected schema from
        the given connection.

        This is used by the default implementation to populate the
        "default_schema_name" attribute and is called exactly
        once upon first connect.

        r   r=  rI   rI   rJ   _get_default_schema_name  rY  z Dialect._get_default_schema_namedbapi_connectionr   c                 C  r   )a  Provide an implementation of ``connection.begin()``, given a
        DB-API connection.

        The DBAPI has no dedicated "begin" method and it is expected
        that transactions are implicit.  This hook is provided for those
        DBAPIs that might need additional help in this area.

        :param dbapi_connection: a DBAPI connection, typically
         proxied within a :class:`.ConnectionFairy`.

        r   rW   r  rI   rI   rJ   do_begin  r]  zDialect.do_beginc                 C  r   )zProvide an implementation of ``connection.rollback()``, given
        a DB-API connection.

        :param dbapi_connection: a DBAPI connection, typically
         proxied within a :class:`.ConnectionFairy`.

        r   r  rI   rI   rJ   do_rollback  r  zDialect.do_rollbackc                 C  r   )zProvide an implementation of ``connection.commit()``, given a
        DB-API connection.

        :param dbapi_connection: a DBAPI connection, typically
         proxied within a :class:`.ConnectionFairy`.

        r   r  rI   rI   rJ   	do_commit  r  zDialect.do_commitrQ   c                 C  r   )a  Provide an implementation of ``connection.close()`` that tries as
        much as possible to not block, given a DBAPI
        connection.

        In the vast majority of cases this just calls .close(), however
        for some asyncio dialects may call upon different API features.

        This hook is called by the :class:`_pool.Pool`
        when a connection is being recycled or has been invalidated.

        .. versionadded:: 1.4.41

        r   r  rI   rI   rJ   do_terminate  r_  zDialect.do_terminatec                 C  r   )a   Provide an implementation of ``connection.close()``, given a DBAPI
        connection.

        This hook is called by the :class:`_pool.Pool`
        when a connection has been
        detached from the pool, or is being returned beyond the normal
        capacity of the pool.

        r   r  rI   rI   rJ   do_close  r[  zDialect.do_closec                 C  r   rU   r   r  rI   rI   rJ   _do_ping_w_event  r/  zDialect._do_ping_w_eventc                 C  r   )zNping the DBAPI connection and return True if the connection is
        usable.r   r  rI   rI   rJ   do_ping     zDialect.do_pingr^   r]   list_of_tuples_GenericSetInputSizesTypecontextExecutionContextc                 C  r   )aJ  invoke the cursor.setinputsizes() method with appropriate arguments

        This hook is called if the :attr:`.Dialect.bind_typing` attribute is
        set to the
        :attr:`.BindTyping.SETINPUTSIZES` value.
        Parameter data is passed in a list of tuples (paramname, dbtype,
        sqltype), where ``paramname`` is the key of the parameter in the
        statement, ``dbtype`` is the DBAPI datatype and ``sqltype`` is the
        SQLAlchemy type. The order of tuples is in the correct parameter order.

        .. versionadded:: 1.4

        .. versionchanged:: 2.0  - setinputsizes mode is now enabled by
           setting :attr:`.Dialect.bind_typing` to
           :attr:`.BindTyping.SETINPUTSIZES`.  Dialects which accept
           a ``use_setinputsizes`` parameter should set this value
           appropriately.


        r   )rW   r^   r  r  rI   rI   rJ   do_set_input_sizes  rM  zDialect.do_set_input_sizesc                 C  r   )zCreate a two-phase transaction ID.

        This id will be passed to do_begin_twophase(),
        do_rollback_twophase(), do_commit_twophase().  Its format is
        unspecified.
        r   rV   rI   rI   rJ   
create_xid  r   zDialect.create_xidc                 C  r   )zCreate a savepoint with the given name.

        :param connection: a :class:`_engine.Connection`.
        :param name: savepoint name.

        r   rW   r<  r   rI   rI   rJ   do_savepoint  r   zDialect.do_savepointc                 C  r   )zRollback a connection to the named savepoint.

        :param connection: a :class:`_engine.Connection`.
        :param name: savepoint name.

        r   r  rI   rI   rJ   do_rollback_to_savepoint  rY  z Dialect.do_rollback_to_savepointc                 C  r   )zRelease the named savepoint on a connection.

        :param connection: a :class:`_engine.Connection`.
        :param name: savepoint name.
        r   r  rI   rI   rJ   do_release_savepoint  s   zDialect.do_release_savepointxidc                 C  r   )zBegin a two phase transaction on the given connection.

        :param connection: a :class:`_engine.Connection`.
        :param xid: xid

        r   rW   r<  r  rI   rI   rJ   do_begin_twophase'  r   zDialect.do_begin_twophasec                 C  r   )zPrepare a two phase transaction on the given connection.

        :param connection: a :class:`_engine.Connection`.
        :param xid: xid

        r   r  rI   rI   rJ   do_prepare_twophase1  r   zDialect.do_prepare_twophaseis_preparedrecoverc                 C  r   )a3  Rollback a two phase transaction on the given connection.

        :param connection: a :class:`_engine.Connection`.
        :param xid: xid
        :param is_prepared: whether or not
         :meth:`.TwoPhaseTransaction.prepare` was called.
        :param recover: if the recover flag was passed.

        r   rW   r<  r  r  r  rI   rI   rJ   do_rollback_twophase;  rf  zDialect.do_rollback_twophasec                 C  r   )a2  Commit a two phase transaction on the given connection.


        :param connection: a :class:`_engine.Connection`.
        :param xid: xid
        :param is_prepared: whether or not
         :meth:`.TwoPhaseTransaction.prepare` was called.
        :param recover: if the recover flag was passed.

        r   r  rI   rI   rJ   do_commit_twophaseN  rT  zDialect.do_commit_twophase	List[Any]c                 C  r   )zRecover list of uncommitted prepared two phase transaction
        identifiers on the given connection.

        :param connection: a :class:`_engine.Connection`.

        r   r=  rI   rI   rJ   do_recover_twophaseb  r   zDialect.do_recover_twophase	statementrm   rr   generic_setinputsizes#Optional[_GenericSetInputSizesType] Iterator[_InsertManyValuesBatch]c                 C  r   )zconvert executemany parameters for an INSERT into an iterator
        of statement/single execute values, used by the insertmanyvalues
        feature.

        r   )rW   r<  r^   r  rm   r  r  rI   rI   rJ   !_deliver_insertmanyvalues_batchesl  s   z)Dialect._deliver_insertmanyvalues_batchesOptional[ExecutionContext]c                 C  r   )zSProvide an implementation of ``cursor.executemany(statement,
        parameters)``.r   rW   r^   r  rm   r  rI   rI   rJ   do_executemany|  rY  zDialect.do_executemanyrn   c                 C  r   )zOProvide an implementation of ``cursor.execute(statement,
        parameters)``.r   r  rI   rI   rJ   
do_execute  rY  zDialect.do_executec                 C  r   )z{Provide an implementation of ``cursor.execute(statement)``.

        The parameter collection should not be sent.

        r   )rW   r^   r  r  rI   rI   rJ   do_execute_no_params  r;  zDialect.do_execute_no_paramse	Exception7Optional[Union[PoolProxiedConnection, DBAPIConnection]]Optional[DBAPICursor]c                 C  r   )zMReturn True if the given DB-API error indicates an invalid
        connectionr   )rW   r  r<  r^   rI   rI   rJ   is_disconnect  r  zDialect.is_disconnectcargscparamsc                 O  r   )a  Establish a connection using this dialect's DBAPI.

        The default implementation of this method is::

            def connect(self, *cargs, **cparams):
                return self.dbapi.connect(*cargs, **cparams)

        The ``*cargs, **cparams`` parameters are generated directly
        from this dialect's :meth:`.Dialect.create_connect_args` method.

        This method may be used for dialects that need to perform programmatic
        per-connection steps when a new connection is procured from the
        DBAPI.


        :param \*cargs: positional parameters returned from the
         :meth:`.Dialect.create_connect_args` method

        :param \*\*cparams: keyword parameters returned from the
         :meth:`.Dialect.create_connect_args` method.

        :return: a DBAPI connection, typically from the :pep:`249` module
         level ``.connect()`` function.

        .. seealso::

            :meth:`.Dialect.create_connect_args`

            :meth:`.Dialect.on_connect`

        r   )rW   r  r  rI   rI   rJ   connect      zDialect.connectOptional[Callable[[Any], Any]]c                 C  s   |   S )a&	  return a callable which sets up a newly created DBAPI connection.

        This method is a new hook that supersedes the
        :meth:`_engine.Dialect.on_connect` method when implemented by a
        dialect.   When not implemented by a dialect, it invokes the
        :meth:`_engine.Dialect.on_connect` method directly to maintain
        compatibility with existing dialects.   There is no deprecation
        for :meth:`_engine.Dialect.on_connect` expected.

        The callable should accept a single argument "conn" which is the
        DBAPI connection itself.  The inner callable has no
        return value.

        E.g.::

            class MyDialect(default.DefaultDialect):
                # ...

                def on_connect_url(self, url):
                    def do_on_connect(connection):
                        connection.execute("SET SPECIAL FLAGS etc")

                    return do_on_connect

        This is used to set dialect-wide per-connection options such as
        isolation modes, Unicode modes, etc.

        This method differs from :meth:`_engine.Dialect.on_connect` in that
        it is passed the :class:`_engine.URL` object that's relevant to the
        connect args.  Normally the only way to get this is from the
        :meth:`_engine.Dialect.on_connect` hook is to look on the
        :class:`_engine.Engine` itself, however this URL object may have been
        replaced by plugins.

        .. note::

            The default implementation of
            :meth:`_engine.Dialect.on_connect_url` is to invoke the
            :meth:`_engine.Dialect.on_connect` method. Therefore if a dialect
            implements this method, the :meth:`_engine.Dialect.on_connect`
            method **will not be called** unless the overriding dialect calls
            it directly from here.

        .. versionadded:: 1.4.3 added :meth:`_engine.Dialect.on_connect_url`
           which normally calls into :meth:`_engine.Dialect.on_connect`.

        :param url: a :class:`_engine.URL` object representing the
         :class:`_engine.URL` that was passed to the
         :meth:`_engine.Dialect.create_connect_args` method.

        :return: a callable that accepts a single DBAPI connection as an
         argument, or None.

        .. seealso::

            :meth:`_engine.Dialect.on_connect`

        )
on_connectr2  rI   rI   rJ   on_connect_url  s   ;zDialect.on_connect_urlc                 C  rf   )a  return a callable which sets up a newly created DBAPI connection.

        The callable should accept a single argument "conn" which is the
        DBAPI connection itself.  The inner callable has no
        return value.

        E.g.::

            class MyDialect(default.DefaultDialect):
                # ...

                def on_connect(self):
                    def do_on_connect(connection):
                        connection.execute("SET SPECIAL FLAGS etc")

                    return do_on_connect

        This is used to set dialect-wide per-connection options such as
        isolation modes, Unicode modes, etc.

        The "do_on_connect" callable is invoked by using the
        :meth:`_events.PoolEvents.connect` event
        hook, then unwrapping the DBAPI connection and passing it into the
        callable.

        .. versionchanged:: 1.4 the on_connect hook is no longer called twice
           for the first connection of a dialect.  The on_connect hook is still
           called before the :meth:`_engine.Dialect.initialize` method however.

        .. versionchanged:: 1.4.3 the on_connect hook is invoked from a new
           method on_connect_url that passes the URL that was used to create
           the connect args.   Dialects can implement on_connect_url instead
           of on_connect if they need the URL object that was used for the
           connection in order to get additional context.

        If None is returned, no event listener is generated.

        :return: a callable that accepts a single DBAPI connection as an
         argument, or None.

        .. seealso::

            :meth:`.Dialect.connect` - allows the DBAPI ``connect()`` sequence
            itself to be controlled.

            :meth:`.Dialect.on_connect_url` - supersedes
            :meth:`.Dialect.on_connect` to also receive the
            :class:`_engine.URL` object in context.

        NrI   rV   rI   rI   rJ   r  	  s   3zDialect.on_connectc                 C  r   )a2  Given a DBAPI connection, revert its isolation to the default.

        Note that this is a dialect-level method which is used as part
        of the implementation of the :class:`_engine.Connection` and
        :class:`_engine.Engine`
        isolation level facilities; these APIs should be preferred for
        most typical use cases.

        .. seealso::

            :meth:`_engine.Connection.get_isolation_level`
            - view current level

            :attr:`_engine.Connection.default_isolation_level`
            - view default level

            :paramref:`.Connection.execution_options.isolation_level` -
            set per :class:`_engine.Connection` isolation level

            :paramref:`_sa.create_engine.isolation_level` -
            set per :class:`_engine.Engine` isolation level

        r   r  rI   rI   rJ   reset_isolation_levelA	  rQ  zDialect.reset_isolation_levellevelr   c                 C  r   )a2  Given a DBAPI connection, set its isolation level.

        Note that this is a dialect-level method which is used as part
        of the implementation of the :class:`_engine.Connection` and
        :class:`_engine.Engine`
        isolation level facilities; these APIs should be preferred for
        most typical use cases.

        If the dialect also implements the
        :meth:`.Dialect.get_isolation_level_values` method, then the given
        level is guaranteed to be one of the string names within that sequence,
        and the method will not need to anticipate a lookup failure.

        .. seealso::

            :meth:`_engine.Connection.get_isolation_level`
            - view current level

            :attr:`_engine.Connection.default_isolation_level`
            - view default level

            :paramref:`.Connection.execution_options.isolation_level` -
            set per :class:`_engine.Connection` isolation level

            :paramref:`_sa.create_engine.isolation_level` -
            set per :class:`_engine.Engine` isolation level

        r   )rW   r  r  rI   rI   rJ   set_isolation_level\	  r  zDialect.set_isolation_levelc                 C  r   )a  Given a DBAPI connection, return its isolation level.

        When working with a :class:`_engine.Connection` object,
        the corresponding
        DBAPI connection may be procured using the
        :attr:`_engine.Connection.connection` accessor.

        Note that this is a dialect-level method which is used as part
        of the implementation of the :class:`_engine.Connection` and
        :class:`_engine.Engine` isolation level facilities;
        these APIs should be preferred for most typical use cases.


        .. seealso::

            :meth:`_engine.Connection.get_isolation_level`
            - view current level

            :attr:`_engine.Connection.default_isolation_level`
            - view default level

            :paramref:`.Connection.execution_options.isolation_level` -
            set per :class:`_engine.Connection` isolation level

            :paramref:`_sa.create_engine.isolation_level` -
            set per :class:`_engine.Engine` isolation level


        r   r  rI   rI   rJ   get_isolation_level~	  s   !zDialect.get_isolation_level
dbapi_connc                 C  r   )a  Given a DBAPI connection, return its isolation level, or
        a default isolation level if one cannot be retrieved.

        This method may only raise NotImplementedError and
        **must not raise any other exception**, as it is used implicitly upon
        first connect.

        The method **must return a value** for a dialect that supports
        isolation level settings, as this level is what will be reverted
        towards when a per-connection isolation level change is made.

        The method defaults to using the :meth:`.Dialect.get_isolation_level`
        method unless overridden by a dialect.

        .. versionadded:: 1.3.22

        r   rW   r  rI   rI   rJ   get_default_isolation_level	  s   z#Dialect.get_default_isolation_levelSequence[IsolationLevel]c                 C  r   )a  return a sequence of string isolation level names that are accepted
        by this dialect.

        The available names should use the following conventions:

        * use UPPERCASE names.   isolation level methods will accept lowercase
          names but these are normalized into UPPERCASE before being passed
          along to the dialect.
        * separate words should be separated by spaces, not underscores, e.g.
          ``REPEATABLE READ``.  isolation level names will have underscores
          converted to spaces before being passed along to the dialect.
        * The names for the four standard isolation names to the extent that
          they are supported by the backend should be ``READ UNCOMMITTED``,
          ``READ COMMITTED``, ``REPEATABLE READ``, ``SERIALIZABLE``
        * if the dialect supports an autocommit option it should be provided
          using the isolation level name ``AUTOCOMMIT``.
        * Other isolation modes may also be present, provided that they
          are named in UPPERCASE and use spaces not underscores.

        This function is used so that the default dialect can check that
        a given isolation level parameter is valid, else raises an
        :class:`_exc.ArgumentError`.

        A DBAPI connection is passed to the method, in the unlikely event that
        the dialect needs to interrogate the connection itself to determine
        this list, however it is expected that most backends will return
        a hardcoded list of values.  If the dialect supports "AUTOCOMMIT",
        that value should also be present in the sequence returned.

        The method raises ``NotImplementedError`` by default.  If a dialect
        does not implement this method, then the default dialect will not
        perform any checking on a given isolation level value before passing
        it onto the :meth:`.Dialect.set_isolation_level` method.  This is
        to allow backwards-compatibility with third party dialects that may
        not yet be implementing this method.

        .. versionadded:: 2.0

        r   r  rI   rI   rJ   get_isolation_level_values	  s   *z"Dialect.get_isolation_level_valuesc                 C  r   rU   r   )rW   r  r  rI   rI   rJ   _assert_and_set_isolation_level	  r  z'Dialect._assert_and_set_isolation_levelType[Dialect]c                 C  s   | S )a}  Given a URL, return the :class:`.Dialect` that will be used.

        This is a hook that allows an external plugin to provide functionality
        around an existing dialect, by allowing the plugin to be loaded
        from the url based on an entrypoint, and then the plugin returns
        the actual dialect to be used.

        By default this just returns the cls.

        rI   r5  r0  rI   rI   rJ   get_dialect_cls	  s   zDialect.get_dialect_clsc                 C  s
   |  |S )a  Given a URL, return the :class:`.Dialect` that will be used by
        an async engine.

        By default this is an alias of :meth:`.Dialect.get_dialect_cls` and
        just returns the cls. It may be used if a dialect provides
        both a sync and async version under the same name, like the
        ``psycopg`` driver.

        .. versionadded:: 2

        .. seealso::

            :meth:`.Dialect.get_dialect_cls`

        )r  r  rI   rI   rJ   get_async_dialect_cls	  s   
zDialect.get_async_dialect_clsc                 C  rf   )aJ  set up the provision.py module for this dialect.

        For dialects that include a provision.py module that sets up
        provisioning followers, this method should initiate that process.

        A typical implementation would be::

            @classmethod
            def load_provisioning(cls):
                __import__("mydialect.provision")

        The default method assumes a module named ``provision.py`` inside
        the owning package of the current dialect, based on the ``__module__``
        attribute::

            @classmethod
            def load_provisioning(cls):
                package = ".".join(cls.__module__.split(".")[0:-1])
                try:
                    __import__(package + ".provision")
                except ImportError:
                    pass

        .. versionadded:: 1.3.14

        NrI   r4  rI   rI   rJ   load_provisioning	
  rY   zDialect.load_provisioningenginer'   c                 C  rf   )a_  A convenience hook called before returning the final
        :class:`_engine.Engine`.

        If the dialect returned a different class from the
        :meth:`.get_dialect_cls`
        method, then the hook is called on both classes, first on
        the dialect class returned by the :meth:`.get_dialect_cls` method and
        then on the class on which the method was called.

        The hook should be used by dialects and/or wrappers to apply special
        events to the engine or its components.   In particular, it allows
        a dialect-wrapping class to apply dialect-level events.

        NrI   )r5  r  rI   rI   rJ   engine_created&
  rY   zDialect.engine_createdc                 C  r   )a  Returns the connection object as returned by the external driver
        package.

        For normal dialects that use a DBAPI compliant driver this call
        will just return the ``connection`` passed as argument.
        For dialects that instead adapt a non DBAPI compliant driver, like
        when adapting an asyncio driver, this call will return the
        connection-like object as returned by the driver.

        .. versionadded:: 1.4.24

        r   r=  rI   rI   rJ   get_driver_connection7
  r]  zDialect.get_driver_connectionoptsCoreExecuteOptionsParameterc                 C  r   )aa  Establish execution options for a given engine.

        This is implemented by :class:`.DefaultDialect` to establish
        event hooks for new :class:`.Connection` instances created
        by the given :class:`.Engine` which will then invoke the
        :meth:`.Dialect.set_connection_execution_options` method for that
        connection.

        r   )rW   r  r  rI   rI   rJ   set_engine_execution_optionsF
  r;  z$Dialect.set_engine_execution_optionsc                 C  r   )a  Establish execution options for a given connection.

        This is implemented by :class:`.DefaultDialect` in order to implement
        the :paramref:`_engine.Connection.execution_options.isolation_level`
        execution option.  Dialects can intercept various execution options
        which may need to modify state on a particular DBAPI connection.

        .. versionadded:: 1.4

        r   )rW   r<  r  rI   rI   rJ    set_connection_execution_optionsT
  r]  z(Dialect.set_connection_execution_options
Type[Pool]c                 C  r   )z*return a Pool class to use for a given URLr   r2  rI   rI   rJ   get_dialect_pool_classc
  s   zDialect.get_dialect_pool_classidentc                 C  rf   )z=Validates an identifier name, raising an exception if invalidNrI   )rW   r  rI   rI   rJ   validate_identifierg
  rY   zDialect.validate_identifier)rR   r   )rR   r-  )r0  r)   rR   r1  )r8  r9  rR   r9  )r<  r&   rR   rS   )r?  r   rR   r`   rU   )
r<  r&   rA  r   rB  r   rC  r   rR   rD  )
r<  r&   rB  r   rH  rI  rC  r   rR   rJ  )
r<  r&   rA  r   rB  r   rC  r   rR   r   )
r<  r&   rB  r   rH  rI  rC  r   rR   rO  )
r<  r&   rA  r   rB  r   rC  r   rR   rR  )
r<  r&   rB  r   rH  rI  rC  r   rR   rU  )r<  r&   rB  r   rC  r   rR   r   )r<  r&   rC  r   rR   r   )
r<  r&   rd  r   rB  r   rC  r   rR   r   )
r<  r&   rA  r   rB  r   rC  r   rR   rg  )
r<  r&   rB  r   rH  rI  rC  r   rR   ri  )
r<  r&   rA  r   rB  r   rC  r   rR   rk  )
r<  r&   rB  r   rH  rI  rC  r   rR   rm  )
r<  r&   rA  r   rB  r   rC  r   rR   ro  )
r<  r&   rB  r   rH  rI  rC  r   rR   rq  )
r<  r&   rA  r   rB  r   rC  r   rR   rs  )
r<  r&   rB  r   rH  rI  rC  r   rR   ru  )
r<  r&   rA  r   rB  r   rC  r   rR   r   )
r<  r&   rB  r   rH  rI  rC  r   rR   rx  )r   r   rR   r   )
r<  r&   rA  r   rB  r   rC  r   rR   r`   )r<  r&   rA  r   r~  r   rB  r   rC  r   rR   r`   )
r<  r&   r  r   rB  r   rC  r   rR   r`   )r<  r&   r  r   rC  r   rR   r`   )r<  r&   rR   r   )r<  r&   rR   r   )r  r   rR   rS   )r  rQ   rR   rS   )r  rQ   rR   r`   )r^   r]   r  r  r  r  rR   r   rR   r   )r<  r&   r   r   rR   rS   )r<  r&   r  r   rR   rS   )TF)
r<  r&   r  r   r  r`   r  r`   rR   rS   )r<  r&   rR   r  )r<  r&   r^   r]   r  r   rm   rr   r  r  r  r  rR   r  )
r^   r]   r  r   rm   rr   r  r  rR   rS   )
r^   r]   r  r   rm   rn   r  r  rR   rS   )r^   r]   r  r   r  r  rR   rS   )r  r  r<  r  r^   r  rR   r`   )r  r   r  r   rR   rQ   )r0  r)   rR   r  )rR   r  )r  rQ   r  r   rR   rS   )r  rQ   rR   r   )r  rQ   rR   r   )r  rQ   rR   r  )r  rQ   r  r   rR   rS   )r0  r)   rR   r  rb   r  r'   rR   rS   )r<  rQ   rR   r   )r  r'   r  r  rR   rS   )r<  r&   r  r  rR   rS   )r0  r)   rR   r  )r  r   rR   rS   )hrA   rB   rC   rM   r>   rD   rE   rF   rG   rH   rc   r   non_memoized_propertyr   r   r  r  
EMPTY_DICTr  _has_eventsr   r   r   bind_typingr.  r3  classmethodr6  r:  r>  r   r@  rF  rL  rN  rP  rS  rV  rX  rZ  r\  r^  r`  ra  rb  re  rh  rj  rl  rn  rp  rr  rt  rv  rw  ry  r{  r|  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rI   rI   rI   rJ   r   s  sH  
 		
		
		!    
.

	

"=5"#,r   c                   @  sB   e Zd ZdZdddZdd	d
ZdddZdddZdddZdS ) CreateEnginePlugina  A set of hooks intended to augment the construction of an
    :class:`_engine.Engine` object based on entrypoint names in a URL.

    The purpose of :class:`_engine.CreateEnginePlugin` is to allow third-party
    systems to apply engine, pool and dialect level event listeners without
    the need for the target application to be modified; instead, the plugin
    names can be added to the database URL.  Target applications for
    :class:`_engine.CreateEnginePlugin` include:

    * connection and SQL performance tools, e.g. which use events to track
      number of checkouts and/or time spent with statements

    * connectivity plugins such as proxies

    A rudimentary :class:`_engine.CreateEnginePlugin` that attaches a logger
    to an :class:`_engine.Engine` object might look like::


        import logging

        from sqlalchemy.engine import CreateEnginePlugin
        from sqlalchemy import event


        class LogCursorEventsPlugin(CreateEnginePlugin):
            def __init__(self, url, kwargs):
                # consume the parameter "log_cursor_logging_name" from the
                # URL query
                logging_name = url.query.get(
                    "log_cursor_logging_name", "log_cursor"
                )

                self.log = logging.getLogger(logging_name)

            def update_url(self, url):
                "update the URL to one that no longer includes our parameters"
                return url.difference_update_query(["log_cursor_logging_name"])

            def engine_created(self, engine):
                "attach an event listener after the new Engine is constructed"
                event.listen(engine, "before_cursor_execute", self._log_event)

            def _log_event(
                self,
                conn,
                cursor,
                statement,
                parameters,
                context,
                executemany,
            ):

                self.log.info("Plugin logged cursor event: %s", statement)

    Plugins are registered using entry points in a similar way as that
    of dialects::

        entry_points = {
            "sqlalchemy.plugins": [
                "log_cursor_plugin = myapp.plugins:LogCursorEventsPlugin"
            ]
        }

    A plugin that uses the above names would be invoked from a database
    URL as in::

        from sqlalchemy import create_engine

        engine = create_engine(
            "mysql+pymysql://scott:tiger@localhost/test?"
            "plugin=log_cursor_plugin&log_cursor_logging_name=mylogger"
        )

    The ``plugin`` URL parameter supports multiple instances, so that a URL
    may specify multiple plugins; they are loaded in the order stated
    in the URL::

        engine = create_engine(
            "mysql+pymysql://scott:tiger@localhost/test?"
            "plugin=plugin_one&plugin=plugin_twp&plugin=plugin_three"
        )

    The plugin names may also be passed directly to :func:`_sa.create_engine`
    using the :paramref:`_sa.create_engine.plugins` argument::

        engine = create_engine(
            "mysql+pymysql://scott:tiger@localhost/test", plugins=["myplugin"]
        )

    .. versionadded:: 1.2.3  plugin names can also be specified
       to :func:`_sa.create_engine` as a list

    A plugin may consume plugin-specific arguments from the
    :class:`_engine.URL` object as well as the ``kwargs`` dictionary, which is
    the dictionary of arguments passed to the :func:`_sa.create_engine`
    call.  "Consuming" these arguments includes that they must be removed
    when the plugin initializes, so that the arguments are not passed along
    to the :class:`_engine.Dialect` constructor, where they will raise an
    :class:`_exc.ArgumentError` because they are not known by the dialect.

    As of version 1.4 of SQLAlchemy, arguments should continue to be consumed
    from the ``kwargs`` dictionary directly, by removing the values with a
    method such as ``dict.pop``. Arguments from the :class:`_engine.URL` object
    should be consumed by implementing the
    :meth:`_engine.CreateEnginePlugin.update_url` method, returning a new copy
    of the :class:`_engine.URL` with plugin-specific parameters removed::

        class MyPlugin(CreateEnginePlugin):
            def __init__(self, url, kwargs):
                self.my_argument_one = url.query["my_argument_one"]
                self.my_argument_two = url.query["my_argument_two"]
                self.my_argument_three = kwargs.pop("my_argument_three", None)

            def update_url(self, url):
                return url.difference_update_query(
                    ["my_argument_one", "my_argument_two"]
                )

    Arguments like those illustrated above would be consumed from a
    :func:`_sa.create_engine` call such as::

        from sqlalchemy import create_engine

        engine = create_engine(
            "mysql+pymysql://scott:tiger@localhost/test?"
            "plugin=myplugin&my_argument_one=foo&my_argument_two=bar",
            my_argument_three="bat",
        )

    .. versionchanged:: 1.4

        The :class:`_engine.URL` object is now immutable; a
        :class:`_engine.CreateEnginePlugin` that needs to alter the
        :class:`_engine.URL` should implement the newly added
        :meth:`_engine.CreateEnginePlugin.update_url` method, which
        is invoked after the plugin is constructed.

        For migration, construct the plugin in the following way, checking
        for the existence of the :meth:`_engine.CreateEnginePlugin.update_url`
        method to detect which version is running::

            class MyPlugin(CreateEnginePlugin):
                def __init__(self, url, kwargs):
                    if hasattr(CreateEnginePlugin, "update_url"):
                        # detect the 1.4 API
                        self.my_argument_one = url.query["my_argument_one"]
                        self.my_argument_two = url.query["my_argument_two"]
                    else:
                        # detect the 1.3 and earlier API - mutate the
                        # URL directly
                        self.my_argument_one = url.query.pop("my_argument_one")
                        self.my_argument_two = url.query.pop("my_argument_two")

                    self.my_argument_three = kwargs.pop("my_argument_three", None)

                def update_url(self, url):
                    # this method is only called in the 1.4 version
                    return url.difference_update_query(
                        ["my_argument_one", "my_argument_two"]
                    )

        .. seealso::

            :ref:`change_5526` - overview of the :class:`_engine.URL` change which
            also includes notes regarding :class:`_engine.CreateEnginePlugin`.


    When the engine creation process completes and produces the
    :class:`_engine.Engine` object, it is again passed to the plugin via the
    :meth:`_engine.CreateEnginePlugin.engine_created` hook.  In this hook, additional
    changes can be made to the engine, most typically involving setup of
    events (e.g. those defined in :ref:`core_event_toplevel`).

    r0  r)   r\   rs  c                 C  s
   || _ dS )a  Construct a new :class:`.CreateEnginePlugin`.

        The plugin object is instantiated individually for each call
        to :func:`_sa.create_engine`.  A single :class:`_engine.
        Engine` will be
        passed to the :meth:`.CreateEnginePlugin.engine_created` method
        corresponding to this URL.

        :param url: the :class:`_engine.URL` object.  The plugin may inspect
         the :class:`_engine.URL` for arguments.  Arguments used by the
         plugin should be removed, by returning an updated :class:`_engine.URL`
         from the :meth:`_engine.CreateEnginePlugin.update_url` method.

         .. versionchanged::  1.4

            The :class:`_engine.URL` object is now immutable, so a
            :class:`_engine.CreateEnginePlugin` that needs to alter the
            :class:`_engine.URL` object should implement the
            :meth:`_engine.CreateEnginePlugin.update_url` method.

        :param kwargs: The keyword arguments passed to
         :func:`_sa.create_engine`.

        N)r0  )rW   r0  r\   rI   rI   rJ   __init__  s   
zCreateEnginePlugin.__init__rR   c                 C  r   )a  Update the :class:`_engine.URL`.

        A new :class:`_engine.URL` should be returned.   This method is
        typically used to consume configuration arguments from the
        :class:`_engine.URL` which must be removed, as they will not be
        recognized by the dialect.  The
        :meth:`_engine.URL.difference_update_query` method is available
        to remove these arguments.   See the docstring at
        :class:`_engine.CreateEnginePlugin` for an example.


        .. versionadded:: 1.4

        r   r2  rI   rI   rJ   
update_url6  r_  zCreateEnginePlugin.update_urldialect_clsr  dialect_argsrS   c                 C  rf   )zparse and modify dialect kwargsNrI   )rW   r  r  rI   rI   rJ   handle_dialect_kwargsG  rY   z(CreateEnginePlugin.handle_dialect_kwargspool_clsr  	pool_argsc                 C  rf   )zparse and modify pool kwargsNrI   )rW   r  r  rI   rI   rJ   handle_pool_kwargsL  rY   z%CreateEnginePlugin.handle_pool_kwargsr  r'   c                 C  rf   )zReceive the :class:`_engine.Engine`
        object when it is fully constructed.

        The plugin may make additional changes to the engine, such as
        registering engine or connection pool events.

        NrI   )rW   r  rI   rI   rJ   r  Q  rY   z!CreateEnginePlugin.engine_createdN)r0  r)   r\   rs  )r0  r)   rR   r)   )r  r  r  rs  rR   rS   )r  r  r  rs  rR   rS   r  )	rA   rB   rC   rM   r  r  r  r  r  rI   rI   rI   rJ   r  k
  s     
0


r  c                   @  s|  e Zd ZU dZded< 	 ded< 	 ded< 	 ded< 	 d	ed
< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 edcd$d%Zeejfddd-d.Z	eded0d1Z
edfd2d3Zdgd;d<Zdhd>d?Zdid@dAZdjdCdDZdkdIdJZdldKdLZdmdNdOZdndSdTZdmdUdVZdodYdZZdpd[d\Zdqd^d_Zdrd`daZdbS )sr  zRA messenger object for a Dialect that corresponds to a single
    execution.

    r'   r  r&   r<  root_connectionr   dialectr]   r^   zOptional[Compiled]compiledr   r  zOptional[Executable]invoked_statement_AnyMultiExecuteParamsrm   r`   r   isinsertisupdaterL   execute_stylers   z;util.generic_fn_descriptor[Optional[Sequence[Column[Any]]]]prefetch_colspostfetch_cols_ExecuteOptionsexecution_optionsr  r   compiled_ddlr/   rR   c                 C  r   rU   r   )r5  r  r<  r  r  r  rI   rI   rJ   	_init_ddl  r  zExecutionContext._init_ddlr3   _CoreMultiExecuteParamsr-   extracted_parameters&Optional[Sequence[BindParameter[Any]]]	cache_hitr>   c
           
      C  r   rU   r   )
r5  r  r<  r  r  r  rm   r  r  r  rI   rI   rJ   _init_compiled  r]  zExecutionContext._init_compiledrr   c                 C  r   rU   r   )r5  r  r<  r  r  r  rm   rI   rI   rJ   _init_statement  rY  z ExecutionContext._init_statementc                 C  r   rU   r   )r5  r  r<  r  r  rI   rI   rJ   _init_default  r   zExecutionContext._init_defaultr|   Optional[Column[Any]]r   r7   type_Optional[TypeEngine[Any]]r   c                 C  r   rU   r   )rW   r|   r   r  rI   rI   rJ   _exec_default  rc  zExecutionContext._exec_default0Optional[List[Tuple[str, Any, TypeEngine[Any]]]]c                 C  r   rU   r   rV   rI   rI   rJ   _prepare_set_input_sizes  r  z)ExecutionContext._prepare_set_input_sizesc                 C  r   rU   r   rV   rI   rI   rJ   _get_cache_stats  r/  z!ExecutionContext._get_cache_statsCursorResult[Any]c                 C  r   rU   r   rV   rI   rI   rJ   _setup_result_proxy  r/  z$ExecutionContext._setup_result_proxyseqSequence_SchemaItemr9   rh   c                 C  r   )zKgiven a :class:`.Sequence`, invoke it and return the next int
        valuer   )rW   r  r  rI   rI   rJ   fire_sequence  r  zExecutionContext.fire_sequencec                 C  r   )zReturn a new cursor generated from this ExecutionContext's
        connection.

        Some dialects may wish to change the behavior of
        connection.cursor(), such as postgresql which may return a PG
        "server side" cursor.
        r   rV   rI   rI   rJ   create_cursor  r  zExecutionContext.create_cursorrS   c                 C  r   )zCalled before an execution of a compiled statement.

        If a compiled statement was passed to this ExecutionContext,
        the `statement` and `parameters` datamembers must be
        initialized after this statement is complete.
        r   rV   rI   rI   rJ   pre_exec
  r   zExecutionContext.pre_execout_param_namesr  rw   c                 C  r   )a!  Return a sequence of OUT parameter values from a cursor.

        For dialects that support OUT parameters, this method will be called
        when there is a :class:`.SQLCompiler` object which has the
        :attr:`.SQLCompiler.has_out_parameters` flag set.  This flag in turn
        will be set to True if the statement itself has :class:`.BindParameter`
        objects that have the ``.isoutparam`` flag set which are consumed by
        the :meth:`.SQLCompiler.visit_bindparam` method.  If the dialect
        compiler produces :class:`.BindParameter` objects with ``.isoutparam``
        set which are not handled by :meth:`.SQLCompiler.visit_bindparam`, it
        should set this flag explicitly.

        The list of names that were rendered for each bound parameter
        is passed to the method.  The method should then return a sequence of
        values corresponding to the list of parameter objects. Unlike in
        previous SQLAlchemy versions, the values can be the **raw values** from
        the DBAPI; the execution context will apply the appropriate type
        handler based on what's present in self.compiled.binds and update the
        values.  The processed dictionary will then be made available via the
        ``.out_parameters`` collection on the result object.  Note that
        SQLAlchemy 1.4 has multiple kinds of result object as part of the 2.0
        transition.

        .. versionadded:: 1.4 - added
           :meth:`.ExecutionContext.get_out_parameter_values`, which is invoked
           automatically by the :class:`.DefaultExecutionContext` when there
           are :class:`.BindParameter` objects with the ``.isoutparam`` flag
           set.  This replaces the practice of setting out parameters within
           the now-removed ``get_result_proxy()`` method.

        r   )rW   r	  rI   rI   rJ   get_out_parameter_values  s   "z)ExecutionContext.get_out_parameter_valuesc                 C  r   )a  Called after the execution of a compiled statement.

        If a compiled statement was passed to this ExecutionContext,
        the `last_insert_ids`, `last_inserted_params`, etc.
        datamembers should be available after this method completes.
        r   rV   rI   rI   rJ   	post_exec8  r   zExecutionContext.post_execr  BaseExceptionc                 C  r   )zQReceive a DBAPI exception which occurred upon execute, result
        fetch, etc.r   )rW   r  rI   rI   rJ   handle_dbapi_exceptionB  s   z'ExecutionContext.handle_dbapi_exceptionc                 C  r   )zjReturn True if the last INSERT or UPDATE row contained
        inlined or database-side defaults.
        r   rV   rI   rI   rJ   lastrow_has_defaultsH  s   z%ExecutionContext.lastrow_has_defaultsr   c                 C  r   )zReturn the DBAPI ``cursor.rowcount`` value, or in some
        cases an interpreted value.

        See :attr:`_engine.CursorResult.rowcount` for details on this.

        r   rV   rI   rI   rJ   get_rowcountO  r   zExecutionContext.get_rowcountc                 C  r   )a  For a RETURNING result, deliver cursor.fetchall() from the
        DBAPI cursor.

        This is a dialect-specific hook for dialects that have special
        considerations when calling upon the rows delivered for a
        "RETURNING" statement.   Default implementation is
        ``cursor.fetchall()``.

        This hook is currently used only by the :term:`insertmanyvalues`
        feature.   Dialects that don't set ``use_insertmanyvalues=True``
        don't need to consider this hook.

        .. versionadded:: 2.0.10

        r   )rW   r^   rI   rI   rJ   fetchall_for_returningY  r7  z'ExecutionContext.fetchall_for_returningN)r  r   r<  r&   r  r   r  r  r  r/   rR   r  )r  r   r<  r&   r  r   r  r  r  r3   rm   r  r  r-   r  r  r  r>   rR   r  )r  r   r<  r&   r  r   r  r  r  r   rm   rr   rR   r  )
r  r   r<  r&   r  r   r  r  rR   r  )r|   r  r   r7   r  r  rR   r   )rR   r  rR   r   )rR   r  )r  r  r  r9   rR   rh   )rR   r]   rb   )r	  r  rR   rw   )r  r  rR   rS   )rR   r`   )rR   r   )r^   r]   rR   rw   )rA   rB   rC   rM   rc   r  r  r>   rF   r  r  r  r  r   r  r  r  r  r  r
  r  r  r  r  r  rI   rI   rI   rJ   r  [  st   
 
	

	








$




r  c                   @  r   )ConnectionEventsTargetzAn object which can accept events from :class:`.ConnectionEvents`.

    Includes :class:`_engine.Connection` and :class:`_engine.Engine`.

    .. versionadded:: 2.0

    z"dispatcher[ConnectionEventsTarget]r   Nr   rI   rI   rI   rJ   r  l  s   
 r  c                   @  s   e Zd ZU dZdZded< 	 ded< 	 ded< 	 d	ed
< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< 	 ded< dS )ExceptionContexta  Encapsulate information about an error condition in progress.

    This object exists solely to be passed to the
    :meth:`_events.DialectEvents.handle_error` event,
    supporting an interface that
    can be extended without backwards-incompatibility.


    rI   r   r  zOptional[Connection]r<  zOptional[Engine]r  r  r^   r   r  z Optional[_DBAPIAnyExecuteParams]rm   r  original_exceptionzOptional[StatementError]sqlalchemy_exceptionzOptional[BaseException]chained_exceptionr  execution_contextr`   r  invalidate_pool_on_disconnectis_pre_pingN)rA   rB   rC   rM   	__slots__rc   rI   rI   rI   rJ   r  {  s:   
 
	
r  c                   @  s@   e Zd ZU dZdZded< edddZdddZdddZ	dS )AdaptedConnectionzInterface of an adapted connection object to support the DBAPI protocol.

    Used by asyncio dialects to provide a sync-style pep-249 facade on top
    of the asyncio connection/cursor API provided by the driver.

    .. versionadded:: 1.4.24

    _connectionr   r  rR   c                 C  s   | j S )z@The connection object as returned by the driver after a connect.r  rV   rI   rI   rJ   driver_connection/  r  z#AdaptedConnection.driver_connectionfnCallable[[Any], Awaitable[_T]]r<   c                 C  s   t || jS )aA  Run the awaitable returned by the given function, which is passed
        the raw asyncio driver connection.

        This is used to invoke awaitable-only methods on the driver connection
        within the context of a "synchronous" method, like a connection
        pool event handler.

        E.g.::

            engine = create_async_engine(...)


            @event.listens_for(engine.sync_engine, "connect")
            def register_custom_types(
                dbapi_connection,  # ...
            ):
                dbapi_connection.run_async(
                    lambda connection: connection.set_type_codec(
                        "MyCustomType", encoder, decoder, ...
                    )
                )

        .. versionadded:: 1.4.30

        .. seealso::

            :ref:`asyncio_events_run_async`

        )r    r  )rW   r  rI   rI   rJ   	run_async4  s   zAdaptedConnection.run_asyncr   c                 C  s
   d| j  S )Nz<AdaptedConnection %s>r  rV   rI   rI   rJ   __repr__T  s   
zAdaptedConnection.__repr__Nr  )r  r   rR   r<   r  )
rA   rB   rC   rM   r  rc   r   r  r!  r"  rI   rI   rI   rJ   r  !  s   
 	
 r  N)rM   
__future__r   enumr   typesr   typingr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r    r   eventr   poolr   r   sql.compilerr   r   r   util.concurrencyr    util.typingr!   r"   r#   r$   baser&   r'   r^   r(   r0  r)   r*   r+   excr,   sqlr-   r.   r/   r0   r1   r2   r3   sql.elementsr4   r5   
sql.schemar6   r7   r8   r  sql.sqltypesr9   sql.type_apir:   r;   r   r1  r<   r>   rL   rQ   rd   r]   _CoreSingleExecuteParams_MutableCoreSingleExecuteParamsr  _CoreAnyExecuteParams_DBAPISingleExecuteParamsrr   _DBAPIAnyExecuteParamsrh   r`   re   _AnySingleExecuteParamsr  _AnyExecuteParamsCompiledCacheTypeSchemaTranslateMapType_ImmutableExecuteOptions_ParamStyler  r   r   r  r  r   r   r   r   r   r   r   r   r   r   r   VersionInfoTypeTableKeyr   r  r  r  Connectabler  r  rI   rI   rI   rJ   <module>   s.  C	.:4<                 q   '