
    +hh              	          d dl 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 Zd%dZ G d d      Z ej2                  eddg g g d       G d deee             Z ej2                  eddg g dg d       G d dee             Z G d  d!ee      Zd" Z e
j<                  e      d#        Z e
j<                  e      d$        Z y)&    N   )exc)ProxyComparable)StartableContext)_ensure_sync_result)AsyncResult   )
inspection)util)create_engine)NestedTransaction)
Connection)Engine)greenlet_spawnc                      |j                  dd      rt        j                  d      d|d<   t        | i |}t	        |      S )aE  Create a new async engine instance.

    Arguments passed to :func:`_asyncio.create_async_engine` are mostly
    identical to those passed to the :func:`_sa.create_engine` function.
    The specified dialect must be an asyncio-compatible dialect
    such as :ref:`dialect-postgresql-asyncpg`.

    .. versionadded:: 1.4

    server_side_cursorsFz}Can't set server_side_cursors for async engine globally; use the connection.stream() method for an async streaming result setTfuture)get	async_excAsyncMethodRequired_create_engineAsyncEngine)argkwsync_engines      P/var/www/html/venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/engine.pycreate_async_enginer      sP     
vv#U+++#
 	

 BxL #,,K{##    c                     | j                         D ci c]%  \  }}|j                  |      r|t        |      d |' }}}d|d<   |j                  |       |j	                  d      }t        |fi |S c c}}w )a  Create a new AsyncEngine instance using a configuration dictionary.

    This function is analogous to the :func:`_sa.engine_from_config` function
    in SQLAlchemy Core, except that the requested dialect must be an
    asyncio-compatible dialect such as :ref:`dialect-postgresql-asyncpg`.
    The argument signature of the function is identical to that
    of :func:`_sa.engine_from_config`.

    .. versionadded:: 1.4.29

    NT_coerce_configurl)items
startswithlenupdatepopr   )configurationprefixkwargskeyvalueoptionsr!   s          r   async_engine_from_configr-   /   s     (--/C>>&! 	CKME!G 
 !%GNN6
++e
Cs.g..s   *A4c                       e Zd ZdZy)AsyncConnectable)_slots_dispatch__weakref__N)__name__
__module____qualname__	__slots__ r   r   r/   r/   F   s    0Ir   r/   z:class:`_future.Connection`z!:class:`_asyncio.AsyncConnection`)closedinvalidateddialectdefault_isolation_level)classmethodsmethods
attributesc                      e Zd ZU dZdZd$dZeed<   	 eed<   	 e	d        Z
d%dZed	        Zd
 Zed        Zed        Zd Zd Zd Zd$dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zdej@                  fdZ!dej@                  fdZ"dej@                  fdZ#dej@                  fdZ$dej@                  fdZ%dej@                  fd Z&d! Z'd" Z(d# Z)y)&AsyncConnectiona  An asyncio proxy for a :class:`_engine.Connection`.

    :class:`_asyncio.AsyncConnection` is acquired using the
    :meth:`_asyncio.AsyncEngine.connect`
    method of :class:`_asyncio.AsyncEngine`::

        from sqlalchemy.ext.asyncio import create_async_engine
        engine = create_async_engine("postgresql+asyncpg://user:pass@host/dbname")

        async with engine.connect() as conn:
            result = await conn.execute(select(table))

    .. versionadded:: 1.4

    )enginer   sync_connectionNc                 `    || _         |j                  | _        | j                  |      | _        y N)r@   r   _assign_proxiedrA   )selfasync_enginerA   s      r   __init__zAsyncConnection.__init__s   s*    "'33#33ODr   rA   r   c                 T    t        t        j                  |j                        |      S rC   )r?   r   _retrieve_proxy_for_targetr@   clstargets     r   _regenerate_proxy_for_targetz,AsyncConnection._regenerate_proxy_for_target   s#    226==A6
 	
r   c                    K   | j                   rt        j                  d      | j                  t	        | j
                  j                         d{         | _         | S 7 w)zzStart this :class:`_asyncio.AsyncConnection` object's context
        outside of using a Python ``with:`` block.

        zconnection is already startedN)rA   r   InvalidRequestErrorrD   r   r   connectrE   is_ctxmanagers     r   startzAsyncConnection.start   sY     
 ))*IJJ#33!$"2"2":":;< 
  =s   AA#A!A#c                 ,    t        j                  d      )zeNot implemented for async; call
        :meth:`_asyncio.AsyncConnection.get_raw_connection`.
        zAsyncConnection.connection accessor is not implemented as the attribute may need to reconnect on an invalidated connection.  Use the get_raw_connection() method.)r   rO   rE   s    r   
connectionzAsyncConnection.connection   s    
 %%3
 	
r   c                 `   K   | j                         }t        t        |d       d{   S 7 w)a  Return the pooled DBAPI-level connection in use by this
        :class:`_asyncio.AsyncConnection`.

        This is a SQLAlchemy connection-pool proxied connection
        which then has the attribute
        :attr:`_pool._ConnectionFairy.driver_connection` that refers to the
        actual driver connection. Its
        :attr:`_pool._ConnectionFairy.dbapi_connection` refers instead
        to an :class:`_engine.AdaptedConnection` instance that
        adapts the driver connection to the DBAPI protocol.

        rV   N)_sync_connectionr   getattrrE   conns     r   get_raw_connectionz"AsyncConnection.get_raw_connection   s+      $$&#GT<@@@@s   %.,.c                     | j                   S rC   )rA   rU   s    r   _proxiedzAsyncConnection._proxied   s    ###r   c                 .    | j                   j                  S )a  Return the :attr:`_engine.Connection.info` dictionary of the
        underlying :class:`_engine.Connection`.

        This dictionary is freely writable for user-defined state to be
        associated with the database connection.

        This attribute is only available if the :class:`.AsyncConnection` is
        currently connected.   If the :attr:`.AsyncConnection.closed` attribute
        is ``True``, then accessing this attribute will raise
        :class:`.ResourceClosedError`.

        .. versionadded:: 1.4.0b2

        )rA   inforU   s    r   r`   zAsyncConnection.info   s      ##(((r   c                 R    | j                   s| j                          | j                   S rC   )rA   _raise_for_not_startedrU   s    r   rX   z AsyncConnection._sync_connection   s#    ##'')###r   c                 8    | j                          t        |       S )z1Begin a transaction prior to autobegin occurring.rX   AsyncTransactionrU   s    r   beginzAsyncConnection.begin   s    %%r   c                 <    | j                          t        | d      S )z;Begin a nested transaction and return a transaction handle.T)nestedrd   rU   s    r   begin_nestedzAsyncConnection.begin_nested   s    T22r   c                 l   K   | j                         }t        |j                  |       d{   S 7 w)zInvalidate the underlying DBAPI connection associated with
        this :class:`_engine.Connection`.

        See the method :meth:`_engine.Connection.invalidate` for full
        detail on this method.

        )	exceptionN)rX   r   
invalidate)rE   rk   r[   s      r   rl   zAsyncConnection.invalidate   s-      $$&#DOOyIIIIs   +424c                 h   K   | j                         }t        |j                         d {   S 7 wrC   rX   r   get_isolation_levelrZ   s     r   ro   z#AsyncConnection.get_isolation_level   +     $$&#D$<$<====   )202c                 h   K   | j                         }t        |j                         d {   S 7 wrC   rn   rZ   s     r   set_isolation_levelz#AsyncConnection.set_isolation_level   rp   rq   c                 B    | j                         }|j                         S zYReturn True if a transaction is in progress.

        .. versionadded:: 1.4.0b2

        )rX   in_transactionrZ   s     r   rv   zAsyncConnection.in_transaction   s!     $$&""$$r   c                 B    | j                         }|j                         S ru   )rX   in_nested_transactionrZ   s     r   rx   z%AsyncConnection.in_nested_transaction  s!     $$&))++r   c                 r    | j                         }|j                         }|t        j                  |      S y)a  Return an :class:`.AsyncTransaction` representing the current
        transaction, if any.

        This makes use of the underlying synchronous connection's
        :meth:`_engine.Connection.get_transaction` method to get the current
        :class:`_engine.Transaction`, which is then proxied in a new
        :class:`.AsyncTransaction` object.

        .. versionadded:: 1.4.0b2

        N)rX   get_transactionre   rI   rE   r[   transs      r   rz   zAsyncConnection.get_transaction  s:     $$&$$&#>>uEEr   c                 r    | j                         }|j                         }|t        j                  |      S y)a  Return an :class:`.AsyncTransaction` representing the current
        nested (savepoint) transaction, if any.

        This makes use of the underlying synchronous connection's
        :meth:`_engine.Connection.get_nested_transaction` method to get the
        current :class:`_engine.Transaction`, which is then proxied in a new
        :class:`.AsyncTransaction` object.

        .. versionadded:: 1.4.0b2

        N)rX   get_nested_transactionre   rI   r{   s      r   r~   z&AsyncConnection.get_nested_transaction  s:     $$&++-#>>uEEr   c                 z   K   | j                         }t        |j                  fi | d{   }||u sJ | S 7 w)a'  Set non-SQL options for the connection which take effect
        during execution.

        This returns this :class:`_asyncio.AsyncConnection` object with
        the new options added.

        See :meth:`_future.Connection.execution_options` for full details
        on this method.

        N)rX   r   execution_options)rE   optr[   c2s       r   r   z!AsyncConnection.execution_options3  sE      $$&!$"8"8@C@@Tzz As   *;9;c                 j   K   | j                         }t        |j                         d{    y7 w)a  Commit the transaction that is currently in progress.

        This method commits the current transaction if one has been started.
        If no transaction was started, the method has no effect, assuming
        the connection is in a non-invalidated state.

        A transaction is begun on a :class:`_future.Connection` automatically
        whenever a statement is first executed, or when the
        :meth:`_future.Connection.begin` method is called.

        N)rX   r   commitrZ   s     r   r   zAsyncConnection.commitD  s(      $$&T[[)))   )313c                 j   K   | j                         }t        |j                         d{    y7 w)a&  Roll back the transaction that is currently in progress.

        This method rolls back the current transaction if one has been started.
        If no transaction was started, the method has no effect.  If a
        transaction was started and the connection is in an invalidated state,
        the transaction is cleared using this method.

        A transaction is begun on a :class:`_future.Connection` automatically
        whenever a statement is first executed, or when the
        :meth:`_future.Connection.begin` method is called.


        N)rX   r   rollbackrZ   s     r   r   zAsyncConnection.rollbackS  s(      $$&T]]+++r   c                 j   K   | j                         }t        |j                         d{    y7 w)zClose this :class:`_asyncio.AsyncConnection`.

        This has the effect of also rolling back the transaction if one
        is in place.

        N)rX   r   closerZ   s     r   r   zAsyncConnection.closed  s(      $$&TZZ(((r   c                    K   | j                         }t        |j                  |||d       d{   }t        || j                         d{   S 7 "7 w)zaExecutes a driver-level SQL string and return buffered
        :class:`_engine.Result`.

        T_require_awaitN)rX   r   exec_driver_sqlr   rE   	statement
parametersr   r[   results         r   r   zAsyncConnection.exec_driver_sqln  s^      $$&%  
 
 )1E1EFFF
 G!   .AAAAAAc           
        K   | j                         }t        |j                  ||t        j                  j                  |ddi      d       d{   }|j                  j                  sJ d       t        |      S 7 ,w)zXExecute a statement and return a streaming
        :class:`_asyncio.AsyncResult` object.stream_resultsTr   Nzserver side result expected)	rX   r   _execute_20r   
EMPTY_DICT
merge_withcontext_is_server_sider   r   s         r   streamzAsyncConnection.stream  s      $$&%OO&&!$4d#;  
 
 ~~--77756""
s   AA?A=-A?c                    K   | j                         }t        |j                  |||d       d{   }t        || j                         d{   S 7 "7 w)a  Executes a SQL statement construct and return a buffered
        :class:`_engine.Result`.

        :param object: The statement to be executed.  This is always
         an object that is in both the :class:`_expression.ClauseElement` and
         :class:`_expression.Executable` hierarchies, including:

         * :class:`_expression.Select`
         * :class:`_expression.Insert`, :class:`_expression.Update`,
           :class:`_expression.Delete`
         * :class:`_expression.TextClause` and
           :class:`_expression.TextualSelect`
         * :class:`_schema.DDL` and objects which inherit from
           :class:`_schema.DDLElement`

        :param parameters: parameters which will be bound into the statement.
         This may be either a dictionary of parameter names to values,
         or a mutable sequence (e.g. a list) of dictionaries.  When a
         list of dictionaries is passed, the underlying statement execution
         will make use of the DBAPI ``cursor.executemany()`` method.
         When a single dictionary is passed, the DBAPI ``cursor.execute()``
         method will be used.

        :param execution_options: optional dictionary of execution options,
         which will be associated with the statement execution.  This
         dictionary can provide a subset of the options that are accepted
         by :meth:`_future.Connection.execution_options`.

        :return: a :class:`_engine.Result` object.

        Tr   N)rX   r   r   r   executer   s         r   r   zAsyncConnection.execute  s\     J $$&%
 
 )>>>
 ?r   c                 d   K   | j                  |||       d{   }|j                         S 7 w)au  Executes a SQL statement construct and returns a scalar object.

        This method is shorthand for invoking the
        :meth:`_engine.Result.scalar` method after invoking the
        :meth:`_future.Connection.execute` method.  Parameters are equivalent.

        :return: a scalar Python value representing the first column of the
         first row returned.

        N)r   scalarrE   r   r   r   r   s        r   r   zAsyncConnection.scalar  s0       ||Iz;LMM}} N   0.0c                 d   K   | j                  |||       d{   }|j                         S 7 w)ai  Executes a SQL statement construct and returns a scalar objects.

        This method is shorthand for invoking the
        :meth:`_engine.Result.scalars` method after invoking the
        :meth:`_future.Connection.execute` method.  Parameters are equivalent.

        :return: a :class:`_engine.ScalarResult` object.

        .. versionadded:: 1.4.24

        N)r   scalarsr   s        r   r   zAsyncConnection.scalars  s1     " ||Iz;LMM~~ Nr   c                 d   K   | j                  |||       d{   }|j                         S 7 w)a  Executes a SQL statement and returns a streaming scalar result
        object.

        This method is shorthand for invoking the
        :meth:`_engine.AsyncResult.scalars` method after invoking the
        :meth:`_future.Connection.stream` method.  Parameters are equivalent.

        :return: an :class:`_asyncio.AsyncScalarResult` object.

        .. versionadded:: 1.4.24

        N)r   r   r   s        r   stream_scalarszAsyncConnection.stream_scalars  s1     $ {{9j:KLL~~ Mr   c                 ^   K   | j                         }t        ||g|i | d{   S 7 w)a  Invoke the given sync callable passing self as the first argument.

        This method maintains the asyncio event loop all the way through
        to the database connection by running the given callable in a
        specially instrumented greenlet.

        E.g.::

            with async_engine.begin() as conn:
                await conn.run_sync(metadata.create_all)

        .. note::

            The provided callable is invoked inline within the asyncio event
            loop, and will block on traditional IO calls.  IO within this
            callable should only call into SQLAlchemy's asyncio database
            APIs which will be properly adapted to the greenlet context.

        .. seealso::

            :ref:`session_run_sync`
        N)rX   r   )rE   fnr   r   r[   s        r   run_synczAsyncConnection.run_sync
  s3     0 $$&#B9s9b9999s   $-+-c                 >    | j                         j                         S rC   )rS   	__await__rU   s    r   r   zAsyncConnection.__await__&  s    zz|%%''r   c                    K   t        j                         j                  | j                               }t        j                  |       d {    y 7 wrC   )asyncioget_event_loopcreate_taskr   shield)rE   type_r+   	tracebacktasks        r   	__aexit__zAsyncConnection.__aexit__)  s7     %%'33DJJLAnnT"""s   A
AAArC   F)*r2   r3   r4   __doc__r5   rG   r   __annotations__r   classmethodrM   rS   propertyrV   r\   r^   r`   rX   rf   ri   rl   ro   rs   rv   rx   rz   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r6   r   r   r?   r?   J   sG   *IE
   	 
 


 
 
A" $ $ ) )"$
&
3

J>>	%,(("*,") //	G4 //	#8 //	.?f //	, //	 . //	 *:8(#r   r?   z:class:`_future.Engine`z:class:`_asyncio.AsyncEngine`)clear_compiled_cacheupdate_execution_optionsget_execution_options)r!   poolr9   r@   namedriverechoc                   z    e Zd ZU dZdZeZeed<    G d de	      Z
d Zeed<   	 ed        Zd	 Zd
 Zd Zd Zd Zy)r   aP  An asyncio proxy for a :class:`_engine.Engine`.

    :class:`_asyncio.AsyncEngine` is acquired using the
    :func:`_asyncio.create_async_engine` function::

        from sqlalchemy.ext.asyncio import create_async_engine
        engine = create_async_engine("postgresql+asyncpg://user:pass@host/dbname")

    .. versionadded:: 1.4

    )r   r^   _option_clsc                        e Zd Zd ZddZd Zy)AsyncEngine._trans_ctxc                     || _         y rC   )r[   rZ   s     r   rG   zAsyncEngine._trans_ctx.__init__S  s	    DIr   c                    K   | j                   j                  |       d {    | j                   j                         | _        | j                  j	                          d {    | j                   S 7 Q7 w)N)rR   )r[   rS   rf   transaction
__aenter__rQ   s     r   rS   zAsyncEngine._trans_ctx.startV  s\     ))///>>>#yy0D""--///99	 ?/s"    A8A4A A8#A6$A86A8c                     K    fd}t        j                         j                   |             }t        j                  |       d {    y 7 w)Nc                     K    j                   j                         d {     j                  j                          d {    y 7 '7 wrC   )r   r   r[   r   )rE   r   r   r+   s   r   goz,AsyncEngine._trans_ctx.__aexit__.<locals>.go^  sC     &&00yIIIiioo''' J's!   !AA!AAAA)r   r   r   r   )rE   r   r+   r   r   r   s   ````  r   r   z AsyncEngine._trans_ctx.__aexit__]  s;     ( ))+77=D..&&&s   A	AAANr   )r2   r3   r4   rG   rS   r   r6   r   r   
_trans_ctxr   R  s    			'r   r   c                     |j                   j                  s-t        j                  d|j                   j                  d      | j                  |      x| _        | _        y )NzFThe asyncio extension requires an async driver to be used. The loaded z is not async.)r9   is_asyncr   rO   r   rD   r   r^   )rE   r   s     r   rG   zAsyncEngine.__init__e  s_    ""++)))1188;>K  ,0+?+?+LL4=r   r   c                     t        |      S rC   )r   rJ   s     r   rM   z(AsyncEngine._regenerate_proxy_for_targetx  s    6""r   c                 D    | j                         }| j                  |      S )a  Return a context manager which when entered will deliver an
        :class:`_asyncio.AsyncConnection` with an
        :class:`_asyncio.AsyncTransaction` established.

        E.g.::

            async with async_engine.begin() as conn:
                await conn.execute(
                    text("insert into table (x, y, z) values (1, 2, 3)")
                )
                await conn.execute(text("my_special_procedure(5)"))


        )rP   r   rZ   s     r   rf   zAsyncEngine.begin|  s     ||~t$$r   c                 $    | j                  |       S )a  Return an :class:`_asyncio.AsyncConnection` object.

        The :class:`_asyncio.AsyncConnection` will procure a database
        connection from the underlying connection pool when it is entered
        as an async context manager::

            async with async_engine.connect() as conn:
                result = await conn.execute(select(user_table))

        The :class:`_asyncio.AsyncConnection` may also be started outside of a
        context manager by invoking its :meth:`_asyncio.AsyncConnection.start`
        method.

        )_connection_clsrU   s    r   rP   zAsyncEngine.connect  s      ##D))r   c                 \   K   t        | j                  j                         d{   S 7 w)zReturn a "raw" DBAPI connection from the connection pool.

        .. seealso::

            :ref:`dbapi_connections`

        N)r   r   raw_connectionrU   s    r   r   zAsyncEngine.raw_connection  s%      $D$4$4$C$CDDDDs   #,*,c                 L    t         | j                  j                  di |      S )a  Return a new :class:`_asyncio.AsyncEngine` that will provide
        :class:`_asyncio.AsyncConnection` objects with the given execution
        options.

        Proxied from :meth:`_future.Engine.execution_options`.  See that
        method for details.

        r6   )r   r   r   )rE   r   s     r   r   zAsyncEngine.execution_options  s&     =4++==DDEEr   c                 ^   K   t        | j                  j                         d{    y7 w)am  Dispose of the connection pool used by this
        :class:`_asyncio.AsyncEngine`.

        This will close all connection pool connections that are
        **currently checked in**.  See the documentation for the underlying
        :meth:`_future.Engine.dispose` method for further notes.

        .. seealso::

            :meth:`_future.Engine.dispose`

        N)r   r   disposerU   s    r   r   zAsyncEngine.dispose  s"      T--55666s   #-+-N)r2   r3   r4   r   r5   r?   r   typer   r   r   rG   r   r   rM   rf   rP   r   r   r   r6   r   r   r   r   .  sh    
" ,I%O'% '&M  # #%$*$E
F7r   r   c                       e Zd ZdZdZddZed        Zd Ze	d        Z
e	d        Ze	d        Zd	 Zd
 Zd ZddZd Zy)re   z4An asyncio proxy for a :class:`_engine.Transaction`.rV   sync_transactionrh   c                 .    || _         d | _        || _        y rC   r   )rE   rV   rh   s      r   rG   zAsyncTransaction.__init__  s    $ $r   c                     |j                   }|}t        |t              }t        j	                  |      }|J | j                  |       }||_         |j                  |      |_        ||_        |S rC   )	rV   
isinstancer   r?   rI   __new__rD   r   rh   )rK   rL   rA   r   rh   async_connectionobjs          r   rM   z-AsyncTransaction._regenerate_proxy_for_target  sw     ++!F$56*EE
  +++kk#)"223CD

r   c                 R    | j                   s| j                          | j                   S rC   )r   rb   rU   s    r   _sync_transactionz"AsyncTransaction._sync_transaction  s#    $$'')$$$r   c                     | j                   S rC   )r   rU   s    r   r^   zAsyncTransaction._proxied  s    $$$r   c                 6    | j                         j                  S rC   )r   is_validrU   s    r   r   zAsyncTransaction.is_valid  s    %%'000r   c                 6    | j                         j                  S rC   )r   	is_activerU   s    r   r   zAsyncTransaction.is_active  s    %%'111r   c                 f   K   t        | j                         j                         d{    y7 w)a;  Close this :class:`.Transaction`.

        If this transaction is the base transaction in a begin/commit
        nesting, the transaction will rollback().  Otherwise, the
        method returns.

        This is used to cancel a Transaction without affecting the scope of
        an enclosing transaction.

        N)r   r   r   rU   s    r   r   zAsyncTransaction.close  s%      T335;;<<<   '1/1c                 f   K   t        | j                         j                         d{    y7 w)z%Roll back this :class:`.Transaction`.N)r   r   r   rU   s    r   r   zAsyncTransaction.rollback   s#     T335>>???r   c                 f   K   t        | j                         j                         d{    y7 w)z"Commit this :class:`.Transaction`.N)r   r   r   rU   s    r   r   zAsyncTransaction.commit  s%      T335<<===r   c                 <  K   | j                  t        | j                  r$| j                  j	                         j
                  n#| j                  j	                         j                         d{         | _        |r| j                  j                          | S 7 +w)z{Start this :class:`_asyncio.AsyncTransaction` object's context
        outside of using a Python ``with:`` block.

        N)	rD   r   rh   rV   rX   ri   rf   r   	__enter__rQ   s     r   rS   zAsyncTransaction.start	  s~      !% 4 4 ;; 002??__557== !
 !!++-s   A,B.B/,Bc                 l   K   t        | j                         j                  |||       d {    y 7 wrC   )r   r   __exit__)rE   r   r+   r   s       r   r   zAsyncTransaction.__aexit__  s0     ""$--ueY
 	
 	
s   *424Nr   )r2   r3   r4   r   r5   rG   r   rM   r   r   r^   r   r   r   r   r   rS   r   r6   r   r   re   re     s~    ><I
   %
 % % 1 1 2 2=@>
"
r   re   c                     t        | t              r| j                  S 	 | j                  S # t        $ r}t        j                  d| z        |d }~ww xY w)NzAsyncEngine expected, got %r)r   r?   rA   r   AttributeErrorr   ArgumentError)rF   es     r   _get_sync_engine_or_connectionr      sW    ,0+++''' *\9
	s   * 	AAAc                 0    t        j                  dd      )NzInspection on an AsyncConnection is currently not supported. Please use ``run_sync`` to pass a callable where it's possible to call ``inspect`` on the passed connection.xd3scoder   NoInspectionAvailablesubjects    r   _no_insp_for_async_conn_yetr   ,  s    

#
#	8 	 r   c                 0    t        j                  dd      )NzInspection on an AsyncEngine is currently not supported. Please obtain a connection then use ``conn.run_sync`` to pass a callable where it's possible to call ``inspect`` on the passed connection.r   r   r   r   s    r   _no_insp_for_async_engine_xyetr   6  s    

#
#	  r   )zsqlalchemy.)!r    r   r   baser   r   r   r   r   r
   r   r@   r   r   engine.baser   r   r   r   util.concurrencyr   r   r-   r/   create_proxy_methodsr?   r   re   r   	_inspectsr   r   r6   r   r   <module>r     s*     ! " '     5 ,    .$./.1 1 !'T#o'79I T#T#n 
#
 NJ7/#3 J7J7ZV
(8 V
r	 o& ' k" #r   