
    ,h0             
      d   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ r   SSKJ!r!  SSK"J#r#  SSK"J#r#  SSK"J$r$  SSK"J$r$  SSKJ%r%  SS K&J'r'  SS!K(J)r)  SS"K(J*r*  SS#K(J+r+  SS$K(J,r,  \(       a  S%S&K-J.r.  S%S'K-J/r/  S%S(K0J1r1  S%S)K2J3r3  SS*KJ4r4  SS+KJ5r5  SS,K6J7r7  SS-K8J9r9  SS.K"J:r:  SS/K"J;r;  SS0K"J<r<  SS1K"J=r=  SS2K"J>r>  SS3K"J?r?  SS4K@JArA  SS5K@JBrB  SS6KCJDrD  SS7KCJErE  SS8KCJFrF  SSKCJrG  SS9KHJIrI  SS:KJJKrK  SS;KJJLrL  \\\M   \\M\4   4   rN\" S<S=S>9rO " S? S@\5      rP " SA SB\5      rQ " SC SD\+5      rR " SE SF\+5      rS " SG SH\+5      rT\\M\4   rU\\M\4   rV\\U   rW\\W\U4   rX\\\   \U4   rY\\\\      \W4   rZ\\Z\Y4   r[\\\MSF\\\   \\\   \\\   \\\   \\]   4      r^\Yr_\Zr`\[ra\\SI4   rb\\\M   \\M   4   rc\%\M\4   rd\)SJ   re\\\M\SK4      rf\)SL   rg " SM SN\,SOSP9rh\%\M\4   ri\\h\\M\4   4   rj " SQ SR\,5      rk " SS ST\,5      rl " SU SV\,5      rm " SW SX\,5      rn " SY SZ\n5      ro " S[ S\\n5      rp " S] S^\n5      rq " S_ S`\n5      rr " Sa Sb\,5      rs " Sc Sd\,5      rt " Se Sf\5      ru\\\\\M4   Sg4   rv\\\M   \M4   rw " Sh Si\5      rx " Sj Sk5      ry " Sl Sm5      rz " Sn So\5      r{\{r| " Sp Sq5      r} " Sr Ss5      r~gt)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                  (    \ rS rSrSrSrSrSrSrSr	g)	
CacheStatsO   r   r&   r          N)
__name__
__module____qualname____firstlineno__	CACHE_HIT
CACHE_MISSCACHING_DISABLEDNO_CACHE_KEYNO_DIALECT_SUPPORT__static_attributes__rD       T/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/engine/interfaces.pyr@   r@   O   s    IJLrO   r@   c                  (    \ rS rSrSrSr Sr SrSrg)ExecuteStyleW   zRindicates the :term:`DBAPI` cursor method that will be used to invoke
a statement.r   r&   r   rD   N)	rE   rF   rG   rH   __doc__EXECUTEEXECUTEMANYINSERTMANYVALUESrN   rD   rO   rP   rR   rR   W   s$     G1K6rO   rR   c                  L    \ rS rSr% SrSS jrSS jrSS jrSS jrS\	S'   S	r
g
)DBAPIConnectionm   zprotocol 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`

c                    g NrD   selfs    rP   closeDBAPIConnection.closey       SrO   c                    g r\   rD   r]   s    rP   commitDBAPIConnection.commit{   s    crO   c                    g r\   rD   )r^   argskwargss      rP   cursorDBAPIConnection.cursor}       rO   c                    g r\   rD   r]   s    rP   rollbackDBAPIConnection.rollback   s    rO   bool
autocommitrD   NreturnNone)rf   r   rg   r   rq   DBAPICursor)rE   rF   rG   rH   rT   r_   rc   rh   rl   __annotations__rN   rD   rO   rP   rY   rY   m   s    	 !!C#rO   rY   c                      \ rS rSrSrSrg)	DBAPIType   zprotocol 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`

rD   N)rE   rF   rG   rH   rT   rN   rD   rO   rP   rv   rv      s    	rO   rv   c                      \ rS rSr% Sr\  SS j5       r\SS j5       rS\S'   S\S'   SS jr	 S     SS
 jjr
      SS jrSS jrSSS jjrSS jrSS jrS S jr S     S!S jjrS"S jrS#S jrSrg	)$rs      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`

c                    g)zThe description attribute of the Cursor.

.. seealso::

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


NrD   r]   s    rP   descriptionDBAPICursor.description   s     	rO   intc                    g r\   rD   r]   s    rP   rowcountDBAPICursor.rowcount   s    "rO   	arraysize	lastrowidc                    g r\   rD   r]   s    rP   r_   DBAPICursor.close   ra   rO   Nc                    g r\   rD   r^   	operation
parameterss      rP   executeDBAPICursor.execute        rO   c                    g r\   rD   r   s      rP   executemanyDBAPICursor.executemany   r   rO   c                    g r\   rD   r]   s    rP   fetchoneDBAPICursor.fetchone       rO   c                    g r\   rD   )r^   sizes     rP   	fetchmanyDBAPICursor.fetchmany       3rO   c                    g r\   rD   r]   s    rP   fetchallDBAPICursor.fetchall   r   rO   c                    g r\   rD   )r^   sizess     rP   setinputsizesDBAPICursor.setinputsizes   r   rO   c                    g r\   rD   )r^   r   columns      rP   setoutputsizeDBAPICursor.setoutputsize   s    SrO   c                    g r\   rD   )r^   procnamer   s      rP   callprocDBAPICursor.callproc   s    rO   c                    g r\   rD   r]   s    rP   nextsetDBAPICursor.nextset   r   rO   c                    g r\   rD   )r^   keys     rP   __getattr__DBAPICursor.__getattr__   s    CrO   rD   )rq   _DBAPICursorDescription)rq   r}   rp   r\   )r   r   r   #Optional[_DBAPISingleExecuteParams]rq   r   )r   r   r   _DBAPIMultiExecuteParamsrq   r   )rq   zOptional[Any]).)r   r}   rq   Sequence[Any])rq   r   )r   r   rq   rr   )r   r   r   r   rq   rr   )r   strr   r   rq   r   )rq   zOptional[bool])r   r   rq   r   )rE   rF   rG   rH   rT   propertyr{   r   rt   r_   r   r   r   r   r   r   r   r   r   r   rN   rD   rO   rP   rs   rs      s    	 	   " "NN 
 ;? 8 
	 - 
	 ->,>@ :=)6	 -/rO   rs   r   )qmarknumericnamedformatpyformatnumeric_dollarTypeEngine[Any])SERIALIZABLEzREPEATABLE READzREAD COMMITTEDzREAD UNCOMMITTED
AUTOCOMMITc                  z    \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S\S'   S\S'   S\S'   S\S'   Srg)_CoreKnownExecutionOptionsi  zOptional[CompiledCacheType]compiled_cacher   logging_tokenIsolationLevelisolation_levelrn   no_parametersstream_resultsr}   max_row_buffer	yield_perinsertmanyvalues_page_sizez Optional[SchemaTranslateMapType]schema_translate_mappreserve_rowcountrD   N)rE   rF   rG   rH   rt   rN   rD   rO   rP   r   r     s=    //##N ##::rO   r   F)totalc                      \ rS rSr% SrS\S'    S\S'    S\S'    S\S'    S\S	'    S\S
'    S\S'    S\S'    S\S'    S\S'    S\S'   Srg)ReflectedIdentityi  a  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.

rn   alwayson_nullr}   start	incrementminvaluemaxvalue
nominvalue
nomaxvaluecycleOptional[int]cacheorderrD   NrE   rF   rG   rH   rT   rt   rN   rD   rO   rP   r   r     sl     L!MJ(N)M,M,++K% 1 K-rO   r   c                  0    \ rS rSr% SrS\S'    S\S'   Srg)	ReflectedComputediH  a  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]	persistedrD   Nr   rD   rO   rP   r   r   H  s     L" ! MrO   r   c                      \ rS rSr% SrS\S'    S\S'    S\S'    S	\S
'    S\S'    S\S'    S\S'    S\S'    S\S'   Srg)ReflectedColumniZ  zDictionary 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   typern   nullableOptional[str]defaultr   autoincrementNotRequired[Optional[str]]commentzNotRequired[ReflectedComputed]computedzNotRequired[ReflectedIdentity]identityNotRequired[Dict[str, Any]]dialect_optionsrD   Nr   rD   rO   rP   r   r   Z  sj     I
EN83$$
 (' -, -, 10rO   r   c                  0    \ rS rSr% SrS\S'    S\S'   Srg)	ReflectedConstrainti  zwDictionary representing the reflected elements corresponding to
:class:`.Constraint`

A base class for all constraints
r   r   r   r   rD   Nr   rD   rO   rP   r   r     s     ''0rO   r   c                  0    \ rS rSr% SrS\S'    S\S'   Srg)	ReflectedCheckConstrainti  zDictionary 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   rD   Nr   rD   rO   rP   r   r     s     L/00rO   r   c                  <    \ rS rSr% SrS\S'    S\S'    S\S'   S	rg
)ReflectedUniqueConstrainti  zDictionary 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   rD   Nr   rD   rO   rP   r   r     s&     ;00L00rO   r   c                  0    \ rS rSr% SrS\S'    S\S'   Srg)	ReflectedPrimaryKeyConstrainti  zDictionary 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   rD   Nr   rD   rO   rP   r   r     s     #"500KrO   r   c                  T    \ rS rSr% SrS\S'    S\S'    S\S'    S\S	'    S
\S'   Srg)ReflectedForeignKeyConstrainti  zDictionary 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   optionsrD   Nr   rD   rO   rP   r   r     s6     #";""1*J((ErO   r   c                  x    \ rS rSr% SrS\S'    S\S'    S\S'    S	\S
'    S\S'    S\S'    S\S'    S\S'   Srg)ReflectedIndexi  zDictionary 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]]expressionsrn   uniquer   duplicates_constraintinclude_columnsz"NotRequired[Dict[str, Tuple[str]]]column_sortingr   r   rD   Nr   rD   rO   rP   r   r     s`     %%
 ('
 L455A++ 76 10ErO   r   c                  $    \ rS rSr% SrS\S'   Srg)ReflectedTableCommenti&  zDictionary 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   textrD   Nr   rD   rO   rP   r  r  &  s     rO   r  c                  (    \ rS rSrSrSr Sr SrSrg)
BindTypingi3  zDefine different methods of passing typing information for
bound parameters in a statement to the database driver.

.. versionadded:: 2.0

r&   r   rB   rD   N)	rE   rF   rG   rH   rT   NONESETINPUTSIZESRENDER_CASTSrN   rD   rO   rP   r
  r
  3  s+     D M LrO   r
  .c                     \ rS rSr% Sr\R                  r\R                  r\R                  r\R                  r	\R                  r
S\S'   S\S'    S\S'    S\S'   S	\S
'    \R                  SS j5       rS\S'    S\S'    S\S'   S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S '    S!\S"'    S#\S$'    S#\S%'   S&\S''    S(\S)'    S\S*'    S+\S,'    S-\S.'    S-\S/'    S\S0'    S\S1'    S\S2'    S\S3'    S\S4'    S\S5'    S\S6'    S7rS\S8'    S\S9'    S\S:'    S\S;'    S\S<'    S\S='    S\S>'    S\S?'    S@\SA'    S+\SB'    S+\SC'    S\SD'    S\SE'    S\SF'    S\SG'    S\SH'    S\SI'    S\SJ'    S\SK'    S\SL'    SM\SN'    S\SO'    S\SP'    S+\SQ'    S\SR'    S\SS'    S\ST'    S\SU'    S\SV'    SWrSX\SY'    SZrS[\S\'    \R$                  rS]\S^'    S\S_'    S\S`'    S\Sa'    SbrScrS\Sd'    S\Se'    \R.                  r S\Sf'    S\Sg'    Sh\Si'    S-\Sj'    Sk\Sl'    Sk\Sm'    S\Sn'    S\So'    S\Sp'    S\Sq'   Sr\Ss'   SSt jrSSu jr\SSv j5       rSSw jrSSx jr\(       a  SSy jr  S         SSz jjr!SWSWS{.         SS| jjr" S         SS} jjr#SWSWS{.         SS~ jjr$ S         SS jjr%SWSWS{.         SS jjr& S       SS jjr' S       SS jjr( S       SS jjr) S       SS jjr* S       SS jjr+ S       SS jjr,SS jr- S         SS jjr. S         SS jjr/SWSWS{.         SS jjr0 S         SS jjr1SWSWS{.         SS jjr2 S         SS jjr3SWSWS{.         SS jjr4 S         SS jjr5SWSWS{.         SS jjr6 S         SS jjr7SWSWS{.         SS jjr8SS jr9SS jr: S         SS jjr; S           SS jjr< S         SS jjr=        SS jr>SS jr?SS jr@SS jrASS jrBSS jrCSS jrDSS jrESS jrFSS jrG        SS jrHSS jrISS jrJ      SS jrKSS jrLSS jrMSS jrN  S         SS jjrO  S         SS jjrPSS jrQ              SS jrR S         SS jjrS S         SS jjrT S       SS jjrU        SS jrVSS jrWSS jrXSS jrYSS jrZ      SS jr[    SS jr\    SS jr]    SS jr^      SS jr_\SS j5       r`\SS j5       ra\SS j5       rb\SS j5       rcSS jrd      SS jre      GS S jrfGSS jrgGSS jrhSZrigW(  Dialectis  a=  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]dbapic                    [        5       e)zgsame as .dbapi, but is never None; will raise an error if no
DBAPI was set up.

.. versionadded:: 2.0

NotImplementedErrorr]   s    rP   loaded_dbapiDialect.loaded_dbapi       "##rO   rn   
positional
paramstyler3   compiler_lintingzType[SQLCompiler]statement_compilerzType[DDLCompiler]ddl_compilerzClassVar[Type[TypeCompiler]]type_compiler_clsr   type_compiler_instancer   type_compilerzType[IdentifierPreparer]preparerr1   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_alterr}   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_returningr2   "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_argumentsrD   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_memosc                    [        5       er\   r  r]   s    rP   _builtin_onconnectDialect._builtin_onconnect      !##rO   c                    [        5       e)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  r^   urls     rP   create_connect_argsDialect.create_connect_args  s    > "##rO   c                    [        5       e)aV  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  clss    rP   import_dbapiDialect.import_dbapi        "##rO   c                    [        5       e)a  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  )r^   typeobjs     rP   type_descriptorDialect.type_descriptor       "##rO   c                    g)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.

NrD   r^   
connections     rP   
initializeDialect.initialize      rO   c                    g r\   rD   )r^   method_names     rP   _overrides_defaultDialect._overrides_default  rj   rO   c                    [        5       e)ac  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  r^   r|  
table_nameschemakws        rP   get_columnsDialect.get_columns      & "##rO   )r  filter_namesc                   [        5       e)aJ  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  r^   r|  r  r  r  s        rP   get_multi_columnsDialect.get_multi_columns$      4 "##rO   c                    [        5       e)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  r  s        rP   get_pk_constraintDialect.get_pk_constraint@  r  rO   c                   [        5       e)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  r  s        rP   get_multi_pk_constraintDialect.get_multi_pk_constraintU      2 "##rO   c                    [        5       e)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  r  s        rP   get_foreign_keysDialect.get_foreign_keysp      $ "##rO   c                   [        5       e)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  r  s        rP   get_multi_foreign_keysDialect.get_multi_foreign_keys  r  rO   c                    [        5       e)zReturn a list of table names for ``schema``.

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

r  r^   r|  r  r  s       rP   get_table_namesDialect.get_table_names       "##rO   c                    [        5       e)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  r  s       rP   get_temp_table_namesDialect.get_temp_table_names       "##rO   c                    [        5       e)zReturn 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  r  s       rP   get_view_namesDialect.get_view_names       "##rO   c                    [        5       e)a  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  r  s       rP   get_materialized_view_names#Dialect.get_materialized_view_names       "##rO   c                    [        5       e)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  r  s       rP   get_sequence_namesDialect.get_sequence_names  r  rO   c                    [        5       e)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  r  s       rP   get_temp_view_namesDialect.get_temp_view_names  r  rO   c                    [        5       e)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  )r^   r|  r  s      rP   get_schema_namesDialect.get_schema_names       "##rO   c                    [        5       e)a  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  )r^   r|  	view_namer  r  s        rP   get_view_definitionDialect.get_view_definition      " "##rO   c                    [        5       e)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  r  s        rP   get_indexesDialect.get_indexes  r  rO   c                   [        5       e)aM  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  r  s        rP   get_multi_indexesDialect.get_multi_indexes$  r  rO   c                    [        5       e)af  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  r  s        rP   get_unique_constraintsDialect.get_unique_constraints@  r  rO   c                   [        5       e)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  r  s        rP   get_multi_unique_constraints$Dialect.get_multi_unique_constraintsS  r  rO   c                    [        5       e)ac  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  r  s        rP   get_check_constraintsDialect.get_check_constraintso  r  rO   c                   [        5       e)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  r  s        rP   get_multi_check_constraints#Dialect.get_multi_check_constraints  r  rO   c                    [        5       e)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  r  s        rP   get_table_optionsDialect.get_table_options  r  rO   c                   [        5       e)aj  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  r  s        rP   get_multi_table_optionsDialect.get_multi_table_options  r  rO   c                    [        5       e)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  r  s        rP   get_table_commentDialect.get_table_comment  s    . "##rO   c                   [        5       e)aa  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  r  s        rP   get_multi_table_commentDialect.get_multi_table_comment  r  rO   c                    [        5       e)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  r^   r   s     rP   normalize_nameDialect.normalize_name  r  rO   c                    [        5       e)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  r  s     rP   denormalize_nameDialect.denormalize_name  r  rO   c                    [        5       e)aI  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  r  s        rP   	has_tableDialect.has_table  s    N "##rO   c                    [        5       e)a1  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  )r^   r|  r  
index_namer  r  s         rP   	has_indexDialect.has_index;  r  rO   c                    [        5       e)a@  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  )r^   r|  sequence_namer  r  s        rP   has_sequenceDialect.has_sequenceV  r  rO   c                    [        5       e)a  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  )r^   r|  schema_namer  s       rP   
has_schemaDialect.has_schemai  s    * "##rO   c                    [        5       e)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{  s     rP   _get_server_version_info Dialect._get_server_version_info       "##rO   c                    [        5       e)zReturn 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{  s     rP   _get_default_schema_name Dialect._get_default_schema_name  r  rO   c                    [        5       e)aj  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  r^   dbapi_connections     rP   do_beginDialect.do_begin  r  rO   c                    [        5       e)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  s     rP   do_rollbackDialect.do_rollback  r  rO   c                    [        5       e)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  s     rP   	do_commitDialect.do_commit  r  rO   c                    [        5       e)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  s     rP   do_terminateDialect.do_terminate  r  rO   c                    [        5       e)zProvide 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  s     rP   do_closeDialect.do_close  r  rO   c                    [        5       er\   r  r  s     rP   _do_ping_w_eventDialect._do_ping_w_event  ri  rO   c                    [        5       e)zFping the DBAPI connection and return True if the connection is
usable.r  r  s     rP   do_pingDialect.do_ping       "##rO   c                    [        5       e)a  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  )r^   rh   list_of_tuplescontexts       rP   do_set_input_sizesDialect.do_set_input_sizes  r  rO   c                    [        5       e)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  r]   s    rP   
create_xidDialect.create_xid  r  rO   c                    [        5       e)zyCreate a savepoint with the given name.

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

r  r^   r|  r   s      rP   do_savepointDialect.do_savepoint  r  rO   c                    [        5       e)zRollback a connection to the named savepoint.

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

r  r  s      rP   do_rollback_to_savepoint Dialect.do_rollback_to_savepoint  r  rO   c                    [        5       e)z}Release the named savepoint on a connection.

:param connection: a :class:`_engine.Connection`.
:param name: savepoint name.
r  r  s      rP   do_release_savepointDialect.do_release_savepoint  s     "##rO   c                    [        5       e)z{Begin a two phase transaction on the given connection.

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

r  r^   r|  xids      rP   do_begin_twophaseDialect.do_begin_twophase'  r  rO   c                    [        5       e)z}Prepare a two phase transaction on the given connection.

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

r  r&  s      rP   do_prepare_twophaseDialect.do_prepare_twophase1  r  rO   c                    [        5       e)a  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  r^   r|  r'  is_preparedrecovers        rP   do_rollback_twophaseDialect.do_rollback_twophase;  r  rO   c                    [        5       e)a  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.  s        rP   do_commit_twophaseDialect.do_commit_twophaseN  r  rO   c                    [        5       e)zRecover list of uncommitted prepared two phase transaction
identifiers on the given connection.

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

r  r{  s     rP   do_recover_twophaseDialect.do_recover_twophaseb  r  rO   c                    [        5       e)zconvert executemany parameters for an INSERT into an iterator
of statement/single execute values, used by the insertmanyvalues
feature.

r  )r^   r|  rh   	statementr   generic_setinputsizesr  s          rP   !_deliver_insertmanyvalues_batches)Dialect._deliver_insertmanyvalues_batchesl  s     "##rO   c                    [        5       e)zKProvide an implementation of ``cursor.executemany(statement,
parameters)``.r  r^   rh   r:  r   r  s        rP   do_executemanyDialect.do_executemany|  r  rO   c                    [        5       e)zGProvide an implementation of ``cursor.execute(statement,
parameters)``.r  r?  s        rP   
do_executeDialect.do_execute  r  rO   c                    [        5       e)zkProvide an implementation of ``cursor.execute(statement)``.

The parameter collection should not be sent.

r  )r^   rh   r:  r  s       rP   do_execute_no_paramsDialect.do_execute_no_params  ry  rO   c                    [        5       e)zEReturn True if the given DB-API error indicates an invalid
connectionr  )r^   er|  rh   s       rP   is_disconnectDialect.is_disconnect  r  rO   c                    [        5       e)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  )r^   cargscparamss      rP   connectDialect.connect      @ "##rO   c                "    U R                  5       $ )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_connectrk  s     rP   on_connect_urlDialect.on_connect_url  s    v   rO   c                    g)aq  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.

NrD   r]   s    rP   rS  Dialect.on_connect	  s    f rO   c                    [        5       e)a  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  s     rP   reset_isolation_levelDialect.reset_isolation_levelA	  r  rO   c                    [        5       e)a  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  )r^   r  levels      rP   set_isolation_levelDialect.set_isolation_level\	  rQ  rO   c                    [        5       e)aY  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  s     rP   get_isolation_levelDialect.get_isolation_level~	  s    B "##rO   c                    [        5       e)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  r^   
dbapi_conns     rP   get_default_isolation_level#Dialect.get_default_isolation_level	  s    ( "##rO   c                    [        5       e)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  rc  s     rP   get_isolation_level_values"Dialect.get_isolation_level_values	  s    T "##rO   c                    [        5       er\   r  )r^   rd  r\  s      rP   _assert_and_set_isolation_level'Dialect._assert_and_set_isolation_level	  r  rO   c                    U $ )aM  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.

rD   rq  rl  s     rP   get_dialect_clsDialect.get_dialect_cls	  s	     
rO   c                $    U R                  U5      $ )aj  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`

)ro  rn  s     rP   get_async_dialect_clsDialect.get_async_dialect_cls	  s    " ""3''rO   c                    g)a  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

NrD   rp  s    rP   load_provisioningDialect.load_provisioning	
  r  rO   c                    g)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.

NrD   )rq  engines     rP   engine_createdDialect.engine_created&
  r  rO   c                    [        5       e)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{  s     rP   get_driver_connectionDialect.get_driver_connection7
  r  rO   c                    [        5       e)a1  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  )r^   rx  optss      rP   set_engine_execution_options$Dialect.set_engine_execution_optionsF
  ry  rO   c                    [        5       e)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  )r^   r|  r  s      rP    set_connection_execution_options(Dialect.set_connection_execution_optionsT
  r  rO   c                    [        5       e)z*return a Pool class to use for a given URLr  rk  s     rP   get_dialect_pool_classDialect.get_dialect_pool_classc
  s    !##rO   c                    g)z=Validates an identifier name, raising an exception if invalidNrD   )r^   idents     rP   validate_identifierDialect.validate_identifierg
  r  rO   )rq   r   )rq   zOptional[_ListenerFnType])rl  r*   rq   ConnectArgsType)rv  TypeEngine[_T]rq   r  )r|  r'   rq   rr   )r  r   rq   rn   r\   )
r|  r'   r  r   r  r   r  r   rq   zList[ReflectedColumn])
r|  r'   r  r   r  Optional[Collection[str]]r  r   rq   z0Iterable[Tuple[TableKey, List[ReflectedColumn]]])
r|  r'   r  r   r  r   r  r   rq   r   )
r|  r'   r  r   r  r  r  r   rq   z8Iterable[Tuple[TableKey, ReflectedPrimaryKeyConstraint]])
r|  r'   r  r   r  r   r  r   rq   z#List[ReflectedForeignKeyConstraint])
r|  r'   r  r   r  r  r  r   rq   z>Iterable[Tuple[TableKey, List[ReflectedForeignKeyConstraint]]])r|  r'   r  r   r  r   rq   r   )r|  r'   r  r   rq   r   )
r|  r'   r  r   r  r   r  r   rq   r   )
r|  r'   r  r   r  r   r  r   rq   zList[ReflectedIndex])
r|  r'   r  r   r  r  r  r   rq   z/Iterable[Tuple[TableKey, List[ReflectedIndex]]])
r|  r'   r  r   r  r   r  r   rq   zList[ReflectedUniqueConstraint])
r|  r'   r  r   r  r  r  r   rq   z:Iterable[Tuple[TableKey, List[ReflectedUniqueConstraint]]])
r|  r'   r  r   r  r   r  r   rq   zList[ReflectedCheckConstraint])
r|  r'   r  r   r  r  r  r   rq   z9Iterable[Tuple[TableKey, List[ReflectedCheckConstraint]]])
r|  r'   r  r   r  r   r  r   rq   Dict[str, Any])
r|  r'   r  r   r  r  r  r   rq   z)Iterable[Tuple[TableKey, Dict[str, Any]]])
r|  r'   r  r   r  r   r  r   rq   r  )
r|  r'   r  r   r  r  r  r   rq   z0Iterable[Tuple[TableKey, ReflectedTableComment]])r   r   rq   r   )
r|  r'   r  r   r  r   r  r   rq   rn   )r|  r'   r  r   r  r   r  r   r  r   rq   rn   )
r|  r'   r  r   r  r   r  r   rq   rn   )r|  r'   r  r   r  r   rq   rn   )r|  r'   rq   r   )r|  r'   rq   r   )r  r   rq   rr   )r  rY   rq   rr   )r  rY   rq   rn   )rh   rs   r  _GenericSetInputSizesTyper  ExecutionContextrq   r   rq   r   )r|  r'   r   r   rq   rr   )r|  r'   r'  r   rq   rr   )TF)
r|  r'   r'  r   r/  rn   r0  rn   rq   rr   )r|  r'   rq   z	List[Any])r|  r'   rh   rs   r:  r   r   r   r;  z#Optional[_GenericSetInputSizesType]r  r  rq   z Iterator[_InsertManyValuesBatch])
rh   rs   r:  r   r   r   r  Optional[ExecutionContext]rq   rr   )
rh   rs   r:  r   r   r   r  r  rq   rr   )rh   rs   r:  r   r  r  rq   rr   )rI  	Exceptionr|  z7Optional[Union[PoolProxiedConnection, DBAPIConnection]]rh   Optional[DBAPICursor]rq   rn   )rM  r   rN  r   rq   rY   )rl  r*   rq   Optional[Callable[[Any], Any]])rq   r  )r  rY   r\  r   rq   rr   )r  rY   rq   r   )rd  rY   rq   r   )rd  rY   rq   zSequence[IsolationLevel])rd  rY   r\  r   rq   rr   )rl  r*   rq   Type[Dialect]rp   rx  r(   rq   rr   )r|  rY   rq   r   )rx  r(   r  CoreExecuteOptionsParameterrq   rr   )r|  r'   r  r  rq   rr   )rl  r*   rq   
Type[Pool])r  r   rq   rr   )jrE   rF   rG   rH   rT   r@   rI   rJ   rK   rL   rM   rt   r   non_memoized_propertyr  r6  rR  rT  
EMPTY_DICTrU  _has_eventsrY  r
  r  bind_typingrg  rm  classmethodrr  rw  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(  r+  r1  r4  r7  r<  r@  rC  rF  rJ  rO  rT  rS  rY  r]  r`  re  rh  rk  ro  rr  ru  ry  r|  r  r  r  r  rN   rD   rO   rP   r  r  s  s    $$I&&J!22**L#66!!
I K2, 
$  $ @O ))C##C33 )(  '& ,+
 32 '& 65E ":9--O 4  1((" --" #'&? !  #'&
   "!: $$ $-S, "&%
 #'&
 ;?> #'&>"&&>< (,+	 )ED
 !$# &)( )-,   !%$  !%$ %)(  $#+& KJ G 
 
 "!
 "!0   	   < )+* :>#%6H K1 #'&
 K%)d)"  $#://K NB0 +*
  9// 0/ %)(= ML##??$$B $ $"$$ C !%	$$ $ 	$
 $ 
$2 !%26$$ 	$
 0$ $ 
:$@ !%	$$ $ 	$
 $ 
'$2 !%26$$ 	$
 0$ $ 
B$> !%	$$ $ 	$
 $ 
-$0 !%26$$ 	$
 0$ $ 
H$: ?C
$$
$.;
$JM
$	
$ ?C$$$.;$JM$	$ ?C$$$.;$JM$	$  ?C$$$.;$JM$	$$ ?C$$$.;$JM$	$  ?C$$$.;$JM$	$$ !%	$$ $ 	$
 $ 
$. !%	$$ $ 	$
 $ 
$0 !%26$$ 	$
 0$ $ 
9$@ !%	$$ $ 	$
 $ 
)$. !%26$$ 	$
 0$ $ 
D$@ !%	$$ $ 	$
 $ 
($0 !%26$$ 	$
 0$ $ 
C$@ !%	$$ $ 	$
 $ 
$& !%26$$ 	$
 0$ $ 
3$> !%	$$ $ 	$
 $ 
$: !%26$$ 	$
 0$ $ 
:$8$$ !%	'$'$ '$ 	'$
 '$ 
'$\ !%$$ $ 	$
 $ $ 
$> !%	$$ $ 	$
 $ 
$&$$$36$>A$	$.	$
$$	$	$$"$$$
$$ 2$ "	$
 
$8$$
$$
$,/
$	
$$$$ !$$ $ 	$
 $ 
$. !$$ $ 	$
 $ 
$($$$ $ 	$
 -$  C$ "$ 
*$* /3
$
$ 
$ -	
$
 ,
$ 

$" /3
$
$ 
$ 8	
$
 ,
$ 

$  /3	$$ $ ,	$
 
$	$	$ L	$ &		$
 
	$ $D;!z3j$6 $ / $8F $	 $D!$ /!$	!$F$)$	$,*$)*$	!*$X$)$2@$	$
   ( ($  8   $$$$?$	$$$$,G$	$$L LrO   r  c                  b    \ rS rSrSrS
S jrSS jr      SS jr      SS jrSS jr	Sr
g	)CreateEnginePluginik
  a  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`).

c                    Xl         g)aq  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rl  )r^   rl  rg   s      rP   __init__CreateEnginePlugin.__init__  s	    2 rO   c                    [        5       e)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  rk  s     rP   
update_urlCreateEnginePlugin.update_url6  r  rO   c                    g)zparse and modify dialect kwargsNrD   )r^   dialect_clsdialect_argss      rP   handle_dialect_kwargs(CreateEnginePlugin.handle_dialect_kwargsG  r  rO   c                    g)zparse and modify pool kwargsNrD   )r^   pool_cls	pool_argss      rP   handle_pool_kwargs%CreateEnginePlugin.handle_pool_kwargsL  r  rO   c                    g)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.

NrD   )r^   rx  s     rP   ry  !CreateEnginePlugin.engine_createdQ  r  rO   r  N)rl  r*   rg   r  )rl  r*   rq   r*   )r  r  r  r  rq   rr   )r  r  r  r  rq   rr   r  )rE   rF   rG   rH   rT   r  r  r  r  ry  rN   rD   rO   rP   r  r  k
  sR    m^6$".(.8F.	.
+"+/=+	+
rO   r  c                  \   \ rS rSr% SrS\S'    S\S'    S\S'    S\S	'    S
\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    \            S3S  j5       r\\R                  4                   S4S! jj5       r
\              S5S" j5       r\          S6S# j5       r        S7S$ jr  S8S% jrS9S& jrS:S' jrS;S( jrS<S) jrS=S* jr    S>S+ jrS=S, jrS?S- jrS@S. jrSAS/ jrSBS0 jrS1rg2)Cr  i[  zJA messenger object for a Dialect that corresponds to a single
execution.

r(   rx  r'   r|  root_connectionr  dialectrs   rh   zOptional[Compiled]compiledr   r:  zOptional[Executable]invoked_statement_AnyMultiExecuteParamsr   rn   r   isinsertisupdaterR   execute_styler   z;util.generic_fn_descriptor[Optional[Sequence[Column[Any]]]]prefetch_colspostfetch_cols_ExecuteOptionsexecution_optionsc                    [        5       er\   r  )rq  r  r|  r  r  compiled_ddls         rP   	_init_ddlExecutionContext._init_ddl  r  rO   c
                    [        5       er\   r  )
rq  r  r|  r  r  r  r   r  extracted_parameters	cache_hits
             rP   _init_compiledExecutionContext._init_compiled  r  rO   c                    [        5       er\   r  )rq  r  r|  r  r  r:  r   s          rP   _init_statement ExecutionContext._init_statement  r  rO   c                    [        5       er\   r  )rq  r  r|  r  r  s        rP   _init_defaultExecutionContext._init_default  r  rO   c                    [        5       er\   r  )r^   r   r   type_s       rP   _exec_defaultExecutionContext._exec_default  r  rO   c                    [        5       er\   r  r]   s    rP   _prepare_set_input_sizes)ExecutionContext._prepare_set_input_sizes  r  rO   c                    [        5       er\   r  r]   s    rP   _get_cache_stats!ExecutionContext._get_cache_stats  ri  rO   c                    [        5       er\   r  r]   s    rP   _setup_result_proxy$ExecutionContext._setup_result_proxy  ri  rO   c                    [        5       e)zCgiven a :class:`.Sequence`, invoke it and return the next int
valuer  )r^   seqr  s      rP   fire_sequenceExecutionContext.fire_sequence  r  rO   c                    [        5       e)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  r]   s    rP   create_cursorExecutionContext.create_cursor  r  rO   c                    [        5       e)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  r]   s    rP   pre_execExecutionContext.pre_exec
  r  rO   c                    [        5       e)aQ  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  )r^   out_param_namess     rP   get_out_parameter_values)ExecutionContext.get_out_parameter_values  s    D "##rO   c                    [        5       e)zCalled 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  r]   s    rP   	post_execExecutionContext.post_exec8  r  rO   c                    [        5       e)zIReceive a DBAPI exception which occurred upon execute, result
fetch, etc.r  )r^   rI  s     rP   handle_dbapi_exception'ExecutionContext.handle_dbapi_exceptionB  s     "##rO   c                    [        5       e)zZReturn True if the last INSERT or UPDATE row contained
inlined or database-side defaults.
r  r]   s    rP   lastrow_has_defaults%ExecutionContext.lastrow_has_defaultsH  s    
 "##rO   c                    [        5       e)zReturn the DBAPI ``cursor.rowcount`` value, or in some
cases an interpreted value.

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

r  r]   s    rP   get_rowcountExecutionContext.get_rowcountO  r  rO   c                    [        5       e)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  )r^   rh   s     rP   fetchall_for_returning'ExecutionContext.fetchall_for_returningY  rt  rO   rD   N)r  r  r|  r'   r  r   r  r  r  r0   rq   r  )r  r  r|  r'   r  r   r  r  r  r4   r   _CoreMultiExecuteParamsr  r.   r  z&Optional[Sequence[BindParameter[Any]]]r  r@   rq   r  )r  r  r|  r'   r  r   r  r  r:  r   r   r   rq   r  )
r  r  r|  r'   r  r   r  r  rq   r  )r   zOptional[Column[Any]]r   r8   r  zOptional[TypeEngine[Any]]rq   r   )rq   z0Optional[List[Tuple[str, Any, TypeEngine[Any]]]]rq   r   )rq   zCursorResult[Any])r  Sequence_SchemaItemr  r:   rq   r}   )rq   rs   rp   )r  rS  rq   r   )rI  BaseExceptionrq   rr   )rq   rn   )rq   r   )rh   rs   rq   r   )rE   rF   rG   rH   rT   rt   r  r  r@   rK   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rN   rD   rO   rP   r  r  [  s   
 N8
  I64   NC ,+ '& =N-N-  ON9 PO '&K$$ $ 0	$
 +$ "$ 
$ $  !+ ; ;$$ $ 0	$
 +$ $ ,$ &$ E$ $ 
$ $ 	$	$ 	$ 0		$
 +	$ 	$ -	$ 
	$ 	$ $$ $ 0	$
 +$ 
$ $$%$ "$ )	$
 
$$	9$
$$$
	$$"$,"$	"$H$$$$$rO   r  c                  $    \ rS rSr% SrS\S'   Srg)ConnectionEventsTargetil  zAn object which can accept events from :class:`.ConnectionEvents`.

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

.. versionadded:: 2.0

z"dispatcher[ConnectionEventsTarget]r  rD   Nr   rD   rO   rP   r   r   l  s     10rO   r   c                      \ rS rSr% SrSrS\S'    S\S'    S\S	'    S
\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'   Srg)ExceptionContexti{  zEncapsulate 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.


rD   r  r  zOptional[Connection]r|  zOptional[Engine]rx  r  rh   r   r:  z Optional[_DBAPIAnyExecuteParams]r   r  original_exceptionzOptional[StatementError]sqlalchemy_exceptionzOptional[BaseException]chained_exceptionr  execution_contextrn   rJ  invalidate_pool_on_disconnectis_pre_pingN)rE   rF   rG   rH   rT   	__slots__rt   rN   rD   rO   rP   r  r  {  s     I %$
  "!  10 &% 32 /. 21& 0 $('  rO   r  c                  P    \ rS rSr% SrSrS\S'   \SS j5       rSS jr	SS jr
S	rg
)AdaptedConnectioni!  zInterface 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  c                    U R                   $ )z@The connection object as returned by the driver after a connect.r  r]   s    rP   driver_connection#AdaptedConnection.driver_connection/  s     rO   c                8    [        U" U R                  5      5      $ )a  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  )r^   fns     rP   	run_asyncAdaptedConnection.run_async4  s    < "T--.//rO   c                     SU R                   -  $ )Nz<AdaptedConnection %s>r  r]   s    rP   __repr__AdaptedConnection.__repr__T  s    '$*:*:::rO   rD   Nr  )r  zCallable[[Any], Awaitable[_T]]rq   r=   r  )rE   rF   rG   rH   rT   r	  rt   r   r  r  r  rN   rD   rO   rP   r  r  !  s1     !I   0@;rO   r  N)rT   
__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(   rh   r)   rl  r*   r+   r,   excr-   sqlr.   r/   r0   r1   r2   r3   r4   sql.elementsr5   r6   
sql.schemar7   r8   r9   r  sql.sqltypesr:   sql.type_apir;   r<   r   r  r=   r@   rR   rY   rv   rs   _CoreSingleExecuteParams_MutableCoreSingleExecuteParamsr  _CoreAnyExecuteParams_DBAPISingleExecuteParamsr   _DBAPIAnyExecuteParamsr}   rn   r   _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  rD   rO   rP   <module>r7     s   8 "             !             ( / # 7 '   ) ! % " # $'"$ 5*1;&*,,#-'<&,)~c3h'??@T 4 ,h .
 
@0( @0F #38, "0c": "#;< 55  "(3-1I"IJ  Xc]44  77  #		
  4 1 * "3
?3  #!=> (c2 G !sC1B'B!CD 
% 
  S)#S 11 
+.	 +.\N	 N$7i 7t1) 12 & 3 (L$7 L F$7 F21FY 1Fh
I 
9 9x c3h,-##$uLk uLp?m m`N$ N$b	1[ 	1 %c cL4; 4;rO   