+
    Xjd                        R t ^ RIHt ^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^RI
Ht ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RI
Ht ^RI
Ht ^RIHt ^RIHt ^RI H!t! ^RI H"t" ]	'       d   ^ RIH#t# ^ RI$H%t% ]PL                  ! R4      t' ! R R]PP                  4      t) ! R R]4      t* ! R R]4      t+ ! R  R!]4      t, ! R" R#]P*                  PZ                  4      t. ! R$ R%]P*                  P^                  4      t0 ! R& R']4      t1 ! R( R)]4      t2 ! R* R+]Pf                  4      t4 ! R, R-]Pj                  4      t6 ! R. R/]Pn                  4      t8 ! R0 R1]Pr                  4      t: ! R2 R3]Pv                  4      t< ! R4 R5]Pz                  4      t> ! R6 R7]P~                  4      t@ ! R8 R9]P                  4      tB ! R: R;]P                  4      tD ! R< R=]P                  4      tF ! R> R?]4      tG ! R@ RA]4      tH ! RB RC]4      tIRD tJ ! RE RF]4      tK ! RG RH4      tL ! RI RJ]L4      tM ! RK RL]4      tN ! RM RN]N4      tO ! RO RP4      tP ! RQ RR]K4      tQ]KtR]QtSR# )Sah  
.. dialect:: postgresql+psycopg
    :name: psycopg (a.k.a. psycopg 3)
    :dbapi: psycopg
    :connectstring: postgresql+psycopg://user:password@host:port/dbname[?key=value&key=value...]
    :url: https://pypi.org/project/psycopg/

``psycopg`` is the package and module name for version 3 of the ``psycopg``
database driver, formerly known as ``psycopg2``.  This driver is different
enough from its ``psycopg2`` predecessor that SQLAlchemy supports it
via a totally separate dialect; support for ``psycopg2`` is expected to remain
for as long as that package continues to function for modern Python versions,
and also remains the default dialect for the ``postgresql://`` dialect
series.

The SQLAlchemy ``psycopg`` dialect provides both a sync and an async
implementation under the same dialect name. The proper version is
selected depending on how the engine is created:

* calling :func:`_sa.create_engine` with ``postgresql+psycopg://...`` will
  automatically select the sync version, e.g.::

    from sqlalchemy import create_engine

    sync_engine = create_engine(
        "postgresql+psycopg://scott:tiger@localhost/test"
    )

* calling :func:`_asyncio.create_async_engine` with
  ``postgresql+psycopg://...`` will automatically select the async version,
  e.g.::

    from sqlalchemy.ext.asyncio import create_async_engine

    asyncio_engine = create_async_engine(
        "postgresql+psycopg://scott:tiger@localhost/test"
    )

The asyncio version of the dialect may also be specified explicitly using the
``psycopg_async`` suffix, as::

    from sqlalchemy.ext.asyncio import create_async_engine

    asyncio_engine = create_async_engine(
        "postgresql+psycopg_async://scott:tiger@localhost/test"
    )

.. seealso::

    :ref:`postgresql_psycopg2` - The SQLAlchemy ``psycopg``
    dialect shares most of its behavior with the ``psycopg2`` dialect.
    Further documentation is available there.

Using psycopg Connection Pooling
--------------------------------

The ``psycopg`` driver provides its own connection pool implementation that
may be used in place of SQLAlchemy's pooling functionality.
This pool implementation provides support for fixed and dynamic pool sizes
(including automatic downsizing for unused connections), connection health
pre-checks, and support for both synchronous and asynchronous code
environments.

Here is an example that uses the sync version of the pool, using
``psycopg_pool >= 3.3`` that introduces support for ``close_returns=True``::

    import psycopg_pool
    from sqlalchemy import create_engine
    from sqlalchemy.pool import NullPool

    # Create a psycopg_pool connection pool
    my_pool = psycopg_pool.ConnectionPool(
        conninfo="postgresql://scott:tiger@localhost/test",
        close_returns=True,  # Return "closed" active connections to the pool
        # ... other pool parameters as desired ...
    )

    # Create an engine that uses the connection pool to get a connection
    engine = create_engine(
        url="postgresql+psycopg://",  # Only need the dialect now
        poolclass=NullPool,  # Disable SQLAlchemy's default connection pool
        creator=my_pool.getconn,  # Use Psycopg 3 connection pool to obtain connections
    )

Similarly an the async example::

    import psycopg_pool
    from sqlalchemy.ext.asyncio import create_async_engine
    from sqlalchemy.pool import NullPool


    async def define_engine():
        # Create a psycopg_pool connection pool
        my_pool = psycopg_pool.AsyncConnectionPool(
            conninfo="postgresql://scott:tiger@localhost/test",
            open=False,  # See comment below
            close_returns=True,  # Return "closed" active connections to the pool
            # ... other pool parameters as desired ...
        )

        # Must explicitly open AsyncConnectionPool outside constructor
        # https://www.psycopg.org/psycopg3/docs/api/pool.html#psycopg_pool.AsyncConnectionPool
        await my_pool.open()

        # Create an engine that uses the connection pool to get a connection
        engine = create_async_engine(
            url="postgresql+psycopg://",  # Only need the dialect now
            poolclass=NullPool,  # Disable SQLAlchemy's default connection pool
            async_creator=my_pool.getconn,  # Use Psycopg 3 connection pool to obtain connections
        )

        return engine, my_pool

The resulting engine may then be used normally. Internally, Psycopg 3 handles
connection pooling::

    with engine.connect() as conn:
        print(conn.scalar(text("select 42")))

.. seealso::

    `Connection pools <https://www.psycopg.org/psycopg3/docs/advanced/pool.html>`_ -
    the Psycopg 3 documentation for ``psycopg_pool.ConnectionPool``.

    `Example for older version of psycopg_pool
    <https://github.com/sqlalchemy/sqlalchemy/discussions/12522#discussioncomment-13024666>`_ -
    An example about using the ``psycopg_pool<3.3`` that did not have the
    ``close_returns``` parameter.

Using a different Cursor class
------------------------------

One of the differences between ``psycopg`` and the older ``psycopg2``
is how bound parameters are handled: ``psycopg2`` would bind them
client side, while ``psycopg`` by default will bind them server side.

It's possible to configure ``psycopg`` to do client side binding by
specifying the ``cursor_factory`` to be ``ClientCursor`` when creating
the engine::

    from psycopg import ClientCursor

    client_side_engine = create_engine(
        "postgresql+psycopg://...",
        connect_args={"cursor_factory": ClientCursor},
    )

Similarly when using an async engine the ``AsyncClientCursor`` can be
specified::

    from psycopg import AsyncClientCursor

    client_side_engine = create_async_engine(
        "postgresql+psycopg://...",
        connect_args={"cursor_factory": AsyncClientCursor},
    )

.. seealso::

    `Client-side-binding cursors <https://www.psycopg.org/psycopg3/docs/advanced/cursors.html#client-side-binding-cursors>`_

)annotations)dequeN)cast)TYPE_CHECKING)ranges)_PGDialect_common_psycopg)"_PGExecutionContext_common_psycopg)INTERVAL)
PGCompiler)PGIdentifierPreparer)	REGCONFIG)JSON)JSONB)JSONPathType)CITEXT)pool)util)AdaptedConnection)sqltypes)await_fallback)
await_only)Iterable)AsyncConnectionzsqlalchemy.dialects.postgresqlc                      ] tR t^tRtRtR# )	_PGStringT N__name__
__module____qualname____firstlineno__render_bind_cast__static_attributes__r          /Users/wind/Downloads/Coruna-main学习资料A/backend/venv/lib/python3.14/site-packages/sqlalchemy/dialects/postgresql/psycopg.pyr   r          r#   r   c                      ] tR t^tRtRtR# )_PGREGCONFIGTr   Nr   r   r#   r$   r'   r'      r%   r#   r'   c                  "    ] tR t^tR tR tRtR# )_PGJSONc                	:    V P                  R VP                  4      # N)_make_bind_processor_psycopg_Jsonselfdialects   &&r$   bind_processor_PGJSON.bind_processor   s    ((w/D/DEEr#   c                	    R # r+   r   r/   r0   coltypes   &&&r$   result_processor_PGJSON.result_processor       r#   r   Nr   r   r   r    r1   r6   r"   r   r#   r$   r)   r)      s    Fr#   r)   c                  "    ] tR t^tR tR tRtR# )_PGJSONBc                	:    V P                  R VP                  4      # r+   )r,   _psycopg_Jsonbr.   s   &&r$   r1   _PGJSONB.bind_processor   s    ((w/E/EFFr#   c                	    R # r+   r   r4   s   &&&r$   r6   _PGJSONB.result_processor   r8   r#   r   Nr9   r   r#   r$   r;   r;      s    Gr#   r;   c                      ] tR t^tRtRtRtR# )_PGJSONIntIndexTypejson_int_indexTr   Nr   r   r   r    __visit_name__r!   r"   r   r#   r$   rB   rB          %Nr#   rB   c                      ] tR t^tRtRtRtR# )_PGJSONStrIndexTypejson_str_indexTr   NrD   r   r#   r$   rH   rH      rF   r#   rH   c                      ] tR t^tRtR# )_PGJSONPathTyper   Nr   r   r   r    r"   r   r#   r$   rK   rK          r#   rK   c                      ] tR t^tRtRtR# )_PGIntervalTr   Nr   r   r#   r$   rO   rO      r%   r#   rO   c                      ] tR t^tRtRtR# )_PGTimeStampTr   Nr   r   r#   r$   rQ   rQ      r%   r#   rQ   c                      ] tR t^tRtRtR# )_PGDateTr   Nr   r   r#   r$   rS   rS      r%   r#   rS   c                      ] tR tRtRtRtR# )_PGTimei  Tr   Nr   r   r#   r$   rU   rU     r%   r#   rU   c                      ] tR tRtRtRtR# )
_PGIntegeri  Tr   Nr   r   r#   r$   rW   rW     r%   r#   rW   c                      ] tR tRtRtRtR# )_PGSmallIntegeri
  Tr   Nr   r   r#   r$   rY   rY   
  r%   r#   rY   c                      ] tR tRtRtRtR# )_PGNullTypei  Tr   Nr   r   r#   r$   r[   r[     r%   r#   r[   c                      ] tR tRtRtRtR# )_PGBigIntegeri  Tr   Nr   r   r#   r$   r]   r]     r%   r#   r]   c                      ] tR tRtRtRtR# )
_PGBooleani  Tr   Nr   r   r#   r$   r_   r_     r%   r#   r_   c                  "    ] tR tRtR tR tRtR# )_PsycopgRangei  c                	H   a \        \        V4      P                  oV3R  lpV# )c                   < \        V \        P                  4      '       d4   S! V P                  V P                  V P
                  V P                  4      p V # r+   )
isinstancer   Rangelowerupperboundsempty)valuepsycopg_Ranges   &r$   to_range._PsycopgRange.bind_processor.<locals>.to_range  s>    %..%KKellEKK Lr#   )r   PGDialect_psycopg_psycopg_Range)r/   r0   rl   rk   s   && @r$   r1   _PsycopgRange.bind_processor  s"    .8GG	 r#   c                	    R  pV# )c                    V e\   \         P                  ! V P                  V P                  V P                  '       d   V P                  MRV P                  '       * R7      p V # )N[)rh   ri   r   re   _lower_upper_boundsrj   s   &r$   rl   0_PsycopgRange.result_processor.<locals>.to_range(  sF     LLLL,1MMM5==t#mm+	 Lr#   r   r/   r0   r5   rl   s   &&& r$   r6   _PsycopgRange.result_processor'  s    	 r#   r   Nr9   r   r#   r$   ra   ra     s    
r#   ra   c                  "    ] tR tRtR tR tRtR# )_PsycopgMultiRangei5  c                	   aaa \        \        V4      P                  o\        \        V4      P                  o\	        R 4      oVVV3R lpV# )Nc                   < \        V \        SS34      '       d   V # S! \        R V 4       Uu. uF6  pS! VP                  VP                  VP
                  VP                  4      NK8  	  up4      # u upi )zIterable[ranges.Range])rd   strr   rf   rg   rh   ri   )rj   elementNoneTypepsycopg_Multirangerk   s   & r$   rl   3_PsycopgMultiRange.bind_processor.<locals>.to_range>  s{    %#x1C!DEE% $((@%#H $I "	 $I
 
s   <A0)r   rn   ro   _psycopg_Multirangetype)r/   r0   rl   r   r   rk   s   && @@@r$   r1   !_PsycopgMultiRange.bind_processor6  sE    .8GG!w


 	 :	  r#   c                	    R  pV# )c                H    V f   R # \         P                  ! R V  4       4      # )Nc              3     "   T F`  p\         P                  ! VP                  VP                  VP                  '       d   VP                  MR VP                  '       * R7      x  Kb  	  R# 5i)rs   rt   Nru   ).0elems   & r$   	<genexpr>H_PsycopgMultiRange.result_processor.<locals>.to_range.<locals>.<genexpr>U  sR      ) !& LL/3|||t||"&,,.	  !&s
   <A*+A*)r   
MultiRangery   s   &r$   rl   5_PsycopgMultiRange.result_processor.<locals>.to_rangeQ  s,    }(( ) !&)  r#   r   r{   s   &&& r$   r6   #_PsycopgMultiRange.result_processorP  s    	 r#   r   Nr9   r   r#   r$   r~   r~   5  s    4r#   r~   c                      ] tR tRtRtR# )PGExecutionContext_psycopgib  r   NrL   r   r#   r$   r   r   b  rM   r#   r   c                      ] tR tRtRtR# )PGCompiler_psycopgif  r   NrL   r   r#   r$   r   r   f  rM   r#   r   c                      ] tR tRtRtR# )PGIdentifierPreparer_psycopgij  r   NrL   r   r#   r$   r   r   j  rM   r#   r   c                \    \         P                  R V P                  V P                  4       R# )z%s: %sN)loggerinfoseveritymessage_primary)
diagnostics   &r$   _log_noticesr   n  s    
KK*--z/I/IJr#   c                    a  ] tR tRtRtRtRtRtRt]	t
]t]tRtRtRt]P&                  ! ]P*                  / ]P.                  ]b]]b]]b]]b]P6                  ]b]]b]P6                  P@                  ]!b]P6                  PD                  ]#b]P6                  PH                  ]%b]PL                  ]'b](]'b]PR                  ]*b]PV                  ],b]PZ                  ].b]P^                  ]0b]Pb                  ]2b]Pf                  ]4b]5Pl                  ]7]5Pp                  ]9/C4      tV 3R lt:V 3R lt;R t<V 3R	 lt=]>R
 4       t?]>R 4       t@]P                  R 4       tB]P                  R 4       tC]P                  R 4       tD]P                  R 4       tE]P                  R 4       tF]P                  R 4       tGR tHV 3R ltIR tJR tKR tLR tMR tNR tO]P                  R 4       tPRtQV ;tR# )rn   ir  psycopgTpyformatNc                	  < \         SV `  ! R
/ VB  V P                  '       Ed   \        P                  ! R V P                  P
                  4      pV'       dT   \        ;QJ d%    . R VP                  ^^^4       4       F  NK  	  5M! R VP                  ^^^4       4       4      V n        V P                  R8  d   \        R4      h^ RI
Hp V! V P                  P                  4      ;V n        pV P                  RJ de   ^ RIpVP!                  RVP"                  P$                  P&                  4       VP!                  RVP"                  P$                  P&                  4       V P(                  '       d   ^ RIHp V! V P(                  V4       V P.                  '       d   ^ R	IHp V! V P.                  V4       R# R# R# )z(\d+)\.(\d+)(?:\.(\d+))?c              3  B   "   T F  qf   K  \        V4      x  K  	  R # 5ir+   )int)r   xs   & r$   r   -PGDialect_psycopg.__init__.<locals>.<genexpr>  s      -$4qFCFF$4s   z,psycopg version 3.0.2 or higher is required.)AdaptersMapFNinetcidr)set_json_loads)set_json_dumpsr   )          )super__init__dbapirematch__version__tuplegrouppsycopg_versionImportErrorpsycopg.adaptr   adapters_psycopg_adapters_map_native_inet_typespsycopg.types.stringregister_loadertypesstring
TextLoader_json_deserializerpsycopg.types.jsonr   _json_serializerr   )	r/   kwargsmr   adapters_mapr   r   r   	__class__s	   &,      r$   r   PGDialect_psycopg.__init__  sm   "6":::4djj6L6LMA',u -$%GGAq!$4-uu -$%GGAq!$4- ($ ##i/!B  28C

##9 D& &&%/+,,GMM00;; ,,GMM00;; &&&=t66E$$$=t44lC %C r#   c                	   < \         SV `  V4      w  r#V P                  '       d   V P                  VR &   V P                  e   V P                  VR&   W#3# )contextclient_encoding)r   create_connect_argsr   r   )r/   urlcargscparamsr   s   &&  r$   r   %PGDialect_psycopg.create_connect_args  sU    4S9%%%!%!;!;GI+)-)=)=G%&~r#   c                	Z    ^ RI Hp VP                  VP                  P                  V4      # r   )TypeInfo)psycopg.typesr   fetch
connectiondriver_connection)r/   r   namer   s   &&& r$   _type_info_fetch"PGDialect_psycopg._type_info_fetch  s"    *~~j33EEtLLr#   c                	  < \         SV `  V4       V P                  '       g   R V n        V P                  '       d   V P                  VR4      pVRJV n        V P                  '       d_   ^ RIHp V P                  '       g   Q hV! W P                  4       VP                  '       g   Q hV! W!P                  P                  4       R# R# R# )FhstoreN)register_hstore)r   
initializeinsert_returninginsert_executemany_returninguse_native_hstorer   _has_native_hstorepsycopg.types.hstorer   r   r   r   )r/   r   r   r   r   s   &&  r$   r   PGDialect_psycopg.initialize  s    :& $$$05D-
 !!!((X>D&*$&6D#&&&@ 11111&@&@A ",,,,,&;&;&M&MN ' "r#   c                	    ^ RI pV# )r   Nr   )clsr   s   & r$   import_dbapiPGDialect_psycopg.import_dbapi  s
    r#   c                	    \         # r+   )PGDialectAsync_psycopg)r   r   s   &&r$   get_async_dialect_cls'PGDialect_psycopg.get_async_dialect_cls  s    %%r#   c                	   R V P                   P                  P                  RV P                   P                  P                  RV P                   P                  P                  RV P                   P                  P
                  /# )zREAD COMMITTEDzREAD UNCOMMITTEDzREPEATABLE READSERIALIZABLE)r   IsolationLevelREAD_COMMITTEDREAD_UNCOMMITTEDREPEATABLE_READr   r/   s   &r$   _isolation_lookup#PGDialect_psycopg._isolation_lookup  sb     djj77FF

 9 9 J Jtzz88HHDJJ55BB	
 	
r#   c                	&    ^ RI Hp VP                  # r   )json)r   r   Jsonr/   r   s   & r$   r-   PGDialect_psycopg._psycopg_Json   s    &yyr#   c                	&    ^ RI Hp VP                  # r   )r   r   Jsonbr   s   & r$   r=    PGDialect_psycopg._psycopg_Jsonb  s    &zzr#   c                	    ^ RI Hp V# )r   )TransactionStatus)
psycopg.pqr  )r/   r  s   & r$   _psycopg_TransactionStatus,PGDialect_psycopg._psycopg_TransactionStatus  s    0  r#   c                	    ^ RI Hp V# )r   )re   )psycopg.types.rangere   )r/   re   s   & r$   ro    PGDialect_psycopg._psycopg_Range  s
    -r#   c                	    ^ RI Hp V# )r   )
Multirange)psycopg.types.multiranger  )r/   r  s   & r$   r   %PGDialect_psycopg._psycopg_Multirange  s    7r#   c                	    W!n         W1n        R # r+   
autocommitisolation_levelr/   r   r  r  s   &&&&r$   _do_isolation_level%PGDialect_psycopg._do_isolation_level  s     *%4"r#   c                	   < VP                   P                  p\        SV `  V4      pW P                  P
                  8X  d   VP                  4        V# r+   )r   transaction_statusr   get_isolation_levelr  IDLErollback)r/   dbapi_connectionstatus_beforerj   r   s   &&  r$   r  %PGDialect_psycopg.get_isolation_level"  sI    (--@@+,<= ;;@@@%%'r#   c                	    VR 8X  d   V P                  VRRR7       R# V P                  VRV P                  V,          R7       R# )
AUTOCOMMITTNr  F)r  r   )r/   r  levels   &&&r$   set_isolation_level%PGDialect_psycopg.set_isolation_level,  sM    L $$ T4 %  $$   $ 6 6u = % r#   c                	    W!n         R # r+   	read_onlyr/   r   rj   s   &&&r$   set_readonlyPGDialect_psycopg.set_readonly8  s    $r#   c                	    VP                   # r+   r#  r/   r   s   &&r$   get_readonlyPGDialect_psycopg.get_readonly;  s    ###r#   c                	l   a a R  pV.oS P                   e   V 3R lpSP                  V4       V3R lpV# )c                0    V P                  \        4       R # r+   )add_notice_handlerr   )conns   &r$   notices-PGDialect_psycopg.on_connect.<locals>.notices?  s    ##L1r#   c                @   < SP                  V SP                  4       R # r+   )r   r  )r/  r/   s   &r$   
on_connect0PGDialect_psycopg.on_connect.<locals>.on_connectF  s    ((t/C/CDr#   c                *   < S F  pV! V 4       K  	  R # r+   r   )r/  fnfnss   & r$   r3  r4  L  s    4 r#   )r  append)r/   r0  r3  r7  s   f  @r$   r3  PGDialect_psycopg.on_connect>  s>    	2 i+E JJz"	 r#   c                	    \        WP                  P                  4      '       d+   Ve'   VP                  '       g   VP                  '       d   R# R# )NTF)rd   r   Errorclosedbroken)r/   er   cursors   &&&&r$   is_disconnectPGDialect_psycopg.is_disconnectR  s9    a))**z/E   J$5$5$5r#   c                	\    VP                   P                  V P                  P                  8H  # r+   )r   r  r  r  )r/   
dbapi_conns   &&r$   _twophase_idle_check&PGDialect_psycopg._twophase_idle_checkX  s*     OO....334	
r#   c                	    R # );r   r   s   &r$   _dialect_specific_select_one.PGDialect_psycopg._dialect_specific_select_one_  s    r#   )r   r   r   r   )r   r   )Sr   r   r   r    driversupports_statement_cachesupports_server_side_cursorsdefault_paramstylesupports_sane_multi_rowcountr   execution_ctx_clsr   statement_compilerr   preparerr   r   r   r   update_copyr   colspecsr   Stringr   r   r'   r   r)   r   r   r;   r   rK   JSONIntIndexTyperB   JSONStrIndexTyperH   IntervalrO   r	   DaterS   DateTimerQ   TimerU   IntegerrW   SmallIntegerrY   
BigIntegerr]   r   AbstractSingleRangera   AbstractMultiRanger~   r   r   r   r   classmethodr   r   memoized_propertyr   r-   r=   r  ro   r   r  r  r   r&  r*  r3  r@  rD  rH  r"   __classcell__)r   s   @r$   rn   rn   r  s   F##' ##' 2++HO !**	
OOY	
|	
 '	
 F		

 MM7	
 8	
 MM&&	
 MM**,?	
 MM**,?	
 {	
 k	
 MM7	
 |	
 MM7	
 j	
  !!?!	
" #	
$ &&%%'9'	
H2'DRM
O4  
 & & 

 
 
 
 
 
 
! !
 
 
 
 
5
%$(
 
 r#   rn   c                      ] tR tRtRtRtR R ltR t]R 4       t	]	P                  R 4       t	R R	 ltR
 tRR ltR tR tR tRR ltR tRtR# )AsyncAdapt_psycopg_cursorid  Nc                   V ^8  d   QhRR/# r   returnNoner   )formats   "r$   __annotate__&AsyncAdapt_psycopg_cursor.__annotate__i  s      $ r#   c                	<    Wn         W n        \        4       V n        R # r+   )_cursorawait_r   _rows)r/   r?  rn  s   &&&r$   r   "AsyncAdapt_psycopg_cursor.__init__i  s    W
r#   c                	.    \        V P                  V4      # r+   )getattrrm  r/   r   s   &&r$   __getattr__%AsyncAdapt_psycopg_cursor.__getattr__n  s    t||T**r#   c                	.    V P                   P                  # r+   rm  	arraysizer   s   &r$   rx  #AsyncAdapt_psycopg_cursor.arraysizeq  s    ||%%%r#   c                	&    WP                   n        R # r+   rw  r/   rj   s   &&r$   rx  ry  u  s    !&r#   c                   V ^8  d   QhRR/# rf  r   )ri  s   "r$   rj  rk  y  s       r#   c                	   "   R # 5ir+   r   r   s   &r$   _async_soft_close+AsyncAdapt_psycopg_cursor._async_soft_closey  s     s   c                	n    V P                   P                  4        V P                  P                  4        R # r+   )ro  clearrm  _closer   s   &r$   closeAsyncAdapt_psycopg_cursor.close|  s"    

r#   c                	V   V P                  V P                  P                  ! W3/ VB 4      pV P                  P                  pV'       d_   VP                  V P
                  P                  8X  d:   V P                  V P                  P                  4       4      p\        V4      V n	        V# r+   )
rn  rm  executepgresultstatus_psycopg_ExecStatus	TUPLES_OKfetchallr   ro  )r/   queryparamskwresultresrowss   &&&,   r$   r  !AsyncAdapt_psycopg_cursor.execute  sz    T\\11%F2FGll## 3::!9!9!C!CC;;t||4467DtDJr#   c                	V    V P                  V P                  P                  W4      4      # r+   )rn  rm  executemany)r/   r  
params_seqs   &&&r$   r  %AsyncAdapt_psycopg_cursor.executemany  s     {{4<<33EFGGr#   c              #  	n   "   V P                   '       d   V P                   P                  4       x  K0  R # 5ir+   ro  popleftr   s   &r$   __iter__"AsyncAdapt_psycopg_cursor.__iter__  s&     jjj**$$&& s   5 5c                	^    V P                   '       d   V P                   P                  4       # R # r+   r  r   s   &r$   fetchone"AsyncAdapt_psycopg_cursor.fetchone  s!    :::::%%''r#   c                	    Vf   V P                   P                  pV P                  p\        \	        V\        V4      4      4       Uu. uF  q2P                  4       NK  	  up# u upi r+   )rm  rx  ro  rangeminlenr  )r/   sizerr_s   &&  r$   	fetchmany#AsyncAdapt_psycopg_cursor.fetchmany  sM    <<<))DZZ&+Cc"g,>&?@&?

&?@@@s   A"c                	d    \        V P                  4      pV P                  P                  4        V# r+   )listro  r  )r/   retvals   & r$   r  "AsyncAdapt_psycopg_cursor.fetchall  s%    djj!

r#   )rm  ro  rn  )rm  rn  ro  r+   )r   r   r   r    	__slots__r  r   rt  propertyrx  setterr~  r  r  r  r  r  r  r  r"   r   r#   r$   rd  rd  d  so    .I
+ & & ' '

H'Ar#   rd  c                  B    ] tR tRtR
R ltR tR tRR ltR tR t	R	t
R# )AsyncAdapt_psycopg_ss_cursori  Nc                	^    V P                  V P                  P                  ! W3/ VB 4       V # r+   )rn  rm  r  )r/   r  r  r  s   &&&,r$   r  $AsyncAdapt_psycopg_ss_cursor.execute  s'    DLL((="=>r#   c                	X    V P                  V P                  P                  4       4       R # r+   )rn  rm  r  r   s   &r$   r  "AsyncAdapt_psycopg_ss_cursor.close  s    DLL&&()r#   c                	T    V P                  V P                  P                  4       4      # r+   )rn  rm  r  r   s   &r$   r  %AsyncAdapt_psycopg_ss_cursor.fetchone      {{4<<00233r#   c                	V    V P                  V P                  P                  V4      4      # r+   )rn  rm  r  )r/   r  s   &&r$   r  &AsyncAdapt_psycopg_ss_cursor.fetchmany  s     {{4<<11$788r#   c                	T    V P                  V P                  P                  4       4      # r+   )rn  rm  r  r   s   &r$   r  %AsyncAdapt_psycopg_ss_cursor.fetchall  r  r#   c              #  	   "   V P                   P                  4       p  V P                  VP                  4       4      x  K%    \         d     R# i ; i5i)TN)rm  	__aiter__rn  	__anext__StopAsyncIteration)r/   iterators   & r$   r  %AsyncAdapt_psycopg_ss_cursor.__iter__  sH     <<))+kk("4"4"677% s(   A!A  AAAAAr   r+   )r   )r   r   r   r    r  r  r  r  r  r  r"   r   r#   r$   r  r    s     *494r#   r  c                      ] tR tRt$ R]R&   Rt]! ]4      tR R lt	R t
RR ltR	 tR
 tR tR t]R 4       t]P$                  R 4       tR tR tR tR tR tR tRR ltRR ltR tRtR# )AsyncAdapt_psycopg_connectioni  r   _connectionc                   V ^8  d   QhRR/# rf  r   )ri  s   "r$   rj  *AsyncAdapt_psycopg_connection.__annotate__  s     & &d &r#   c                	    Wn         R # r+   r  r)  s   &&r$   r   &AsyncAdapt_psycopg_connection.__init__  s    %r#   c                	.    \        V P                  V4      # r+   )rr  r  rs  s   &&r$   rt  )AsyncAdapt_psycopg_connection.__getattr__  s    t''..r#   Nc                	    V P                  V P                  P                  ! W3/ VB 4      p\        W@P                   4      # r+   )rn  r  r  rd  )r/   r  r  r  r?  s   &&&, r$   r  %AsyncAdapt_psycopg_connection.execute  s5    T--55eJrJK(==r#   c                	    V P                   P                  ! V/ VB p\        VR 4      '       d   \        W0P                  4      # \        W0P                  4      # )r   )r  r?  hasattrr  rn  rd  )r/   argsr  r?  s   &*, r$   r?  $AsyncAdapt_psycopg_connection.cursor  sH    !!(($5"566""/DD,V[[AAr#   c                	X    V P                  V P                  P                  4       4       R # r+   )rn  r  commitr   s   &r$   r  $AsyncAdapt_psycopg_connection.commit  s    D$$++-.r#   c                	X    V P                  V P                  P                  4       4       R # r+   )rn  r  r  r   s   &r$   r  &AsyncAdapt_psycopg_connection.rollback  s    D$$--/0r#   c                	X    V P                  V P                  P                  4       4       R # r+   )rn  r  r  r   s   &r$   r  #AsyncAdapt_psycopg_connection.close  s    D$$**,-r#   c                	.    V P                   P                  # r+   )r  r  r   s   &r$   r  (AsyncAdapt_psycopg_connection.autocommit  s    ***r#   c                	(    V P                  V4       R # r+   set_autocommitr{  s   &&r$   r  r    s    E"r#   c                	Z    V P                  V P                  P                  V4      4       R # r+   )rn  r  r  r{  s   &&r$   r  ,AsyncAdapt_psycopg_connection.set_autocommit      D$$33E:;r#   c                	Z    V P                  V P                  P                  V4      4       R # r+   )rn  r  r   r{  s   &&r$   r   1AsyncAdapt_psycopg_connection.set_isolation_level  s    D$$88?@r#   c                	Z    V P                  V P                  P                  V4      4       R # r+   )rn  r  set_read_onlyr{  s   &&r$   r  +AsyncAdapt_psycopg_connection.set_read_only  s    D$$2259:r#   c                	Z    V P                  V P                  P                  V4      4       R # r+   )rn  r  set_deferrabler{  s   &&r$   r  ,AsyncAdapt_psycopg_connection.set_deferrable  r  r#   c                	V    V P                  V P                  P                  V4      4      # r+   )rn  r  	tpc_beginr/   xids   &&r$   r  'AsyncAdapt_psycopg_connection.tpc_begin  s"    {{4++55c:;;r#   c                	T    V P                  V P                  P                  4       4      # r+   )rn  r  tpc_preparer   s   &r$   r  )AsyncAdapt_psycopg_connection.tpc_prepare       {{4++779::r#   c                	V    V P                  V P                  P                  V4      4      # r+   )rn  r  
tpc_commitr  s   &&r$   r  (AsyncAdapt_psycopg_connection.tpc_commit  s"    {{4++66s;<<r#   c                	V    V P                  V P                  P                  V4      4      # r+   )rn  r  tpc_rollbackr  s   &&r$   r  *AsyncAdapt_psycopg_connection.tpc_rollback  s"    {{4++88=>>r#   c                	T    V P                  V P                  P                  4       4      # r+   )rn  r  tpc_recoverr   s   &r$   r  )AsyncAdapt_psycopg_connection.tpc_recover   r  r#   r  r   r+   )r   r   r   r    __annotations__r  staticmethodr   rn  r   rt  r  r?  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r"   r   r#   r$   r  r    s      I*%F&/>B/1. + + # #<A;<<;=?;r#   r  c                  *    ] tR tRtRt]! ]4      tRtR# )%AsyncAdaptFallback_psycopg_connectioni  r   N)	r   r   r   r    r  r  r   rn  r"   r   r#   r$   r  r    s    I.)Fr#   r  c                  (    ] tR tRtR R ltR tRtR# )PsycopgAdaptDBAPIi	  c                   V ^8  d   QhRR/# rf  r   )ri  s   "r$   rj  PsycopgAdaptDBAPI.__annotate__
  s     % %4 %r#   c                	    Wn         V P                   P                  P                  4        F  w  r#VR 8w  g   K  W0P                  V&   K  	  R# )connectN)r   __dict__items)r/   r   kvs   &&  r$   r   PsycopgAdaptDBAPI.__init__
  s9    LL))//1DAI~#$a  2r#   c           	     	&   VP                  R R4      pVP                  RV P                  P                  P                  4      p\        P
                  ! V4      '       d   \        \        V! V/ VB 4      4      # \        \        V! V/ VB 4      4      # )async_fallbackFasync_creator_fn)
popr   r   r  r   asboolr  r   r  r   )r/   argr  r  
creator_fns   &*,  r$   r  PsycopgAdaptDBAPI.connect  s     0%8VV < < D D

 ;;~&&8z35"56  1:s1b12 r#   r   N)r   r   r   r    r   r  r"   r   r#   r$   r   r   	  s    %r#   r   c                  b    ] tR tRtRtRt]R 4       t]R 4       tR t	R t
R tR tR	 tR
 tRtR# )r   i   Tc                	B    ^ RI p^ RIHp V\        n        \        V4      # )r   N)
ExecStatus)r   r  r  rd  r  r   )r   r   r  s   &  r$   r   #PGDialectAsync_psycopg.import_dbapi$  s    )8B!5 ))r#   c                	    VP                   P                  R R4      p\        P                  ! V4      '       d   \        P
                  # \        P                  # )r  F)r  getr   r  r   FallbackAsyncAdaptedQueuePoolAsyncAdaptedQueuePool)r   r   r  s   && r$   get_pool_class%PGDialectAsync_psycopg.get_pool_class-  s>    '7?;;~&&555---r#   c                	|    ^ RI Hp VP                  pVP                  VP	                  VP
                  V4      4      # r   )r   r   r   rn  r   r   )r/   r   r   r   adapteds   &&&  r$   r   'PGDialectAsync_psycopg._type_info_fetch6  s0    *''~~hnnW-F-FMNNr#   c                	J    VP                  V4       VP                  V4       R # r+   )r  r   r  s   &&&&r$   r  *PGDialectAsync_psycopg._do_isolation_level<  s    !!*-&&7r#   c                	(    VP                  V4       R # r+   r  r%  s   &&&r$   _do_autocommit%PGDialectAsync_psycopg._do_autocommit@      !!%(r#   c                	(    VP                  V4       R # r+   )r  r%  s   &&&r$   r&  #PGDialectAsync_psycopg.set_readonlyC  s      'r#   c                	(    VP                  V4       R # r+   )r  r%  s   &&&r$   r  %PGDialectAsync_psycopg.set_deferrableF  r$  r#   c                	    VP                   # r+   r  r)  s   &&r$   get_driver_connection,PGDialectAsync_psycopg.get_driver_connectionI  s    %%%r#   r   N)r   r   r   r    is_asyncrK  r`  r   r  r   r  r"  r&  r  r*  r"   r   r#   r$   r   r      sR    H#* * . .O8)()&r#   r   )T__doc__
__future__r   collectionsr   loggingr   typingr   r    r   _psycopg_commonr   r   baser	   r
   r   r   r   r   r   r   r   r   r   r   enginer   sqlr   util.concurrencyr   r   r   r   r   	getLoggerr   rT  r   r'   r)   r;   rU  rB   rV  rH   rK   rO   rY  rQ   rX  rS   rZ  rU   r[  rW   r\  rY   NullTyper[   r]  r]   Booleanr_   AbstractSingleRangeImplra   AbstractMultiRangeImplr~   r   r   r   r   rn   rd  r  r  r  r   r   r0   dialect_asyncr   r#   r$   <module>r>     s-  aF #   	     6 ?   &        '  . *'			;	< 9 d u (--88 (--88 	l 	( 8$$ hmm hmm !! h++ (## H'' !! F22 6*66 *Z	!C 		 		#7 	Ko1 od@ @F#< 4@;$5 @;F*,I *
 .*&. *&Z &r#   