Ë
    êëjù  ã                  óº  — U d Z ddlmZ ddlmZmZmZmZ ddlmZm	Z	m
Z
mZmZ ddlmZ ddlmZ ddlmZmZmZ er(dd	lmZ dd
lmZmZ ddlmZ ddlmZmZ ddlmZ ddl m!Z!  e"d«      Z#de$d<   ee%e&e'f   Z(de$d<   eee%ddf   Z)de$d<   eee   e	e*ef   f   Z+de$d<    edd¬«      Z,eg df   Z-de$d<   ee"df   Z.de$d<   ee*e/df   Z0de$d<   ee*e0f   Z1de$d<   e	e*e0f   Z2de$d <    ed!«      Z3ed"d#e3f   Z4de$d$<   	 ed%d#e3f   Z5de$d&<   	  G d'„ d(e
«      Z6eegd)f   Z7de$d*<   ee(gef   Z8de$d+<    G d,„ d-e
«      Z9 G d.„ d/e
«      Z: G d0„ d1e
«      Z; G d2„ d3e
«      Z<y)4zN
Protocol objects representing different implementations of the same classes.
é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚCallableÚDict)Ú	GeneratorÚMappingÚProtocolÚSequenceÚUnioné   )Úpq)ÚPyFormat)ÚLiteralStringÚ	TypeAliasÚTypeVar)Úsql)ÚRowÚRowMaker)ÚPGresult)ÚReadyÚWait)ÚAdaptersMap)ÚBaseConnectionNÚtypeÚNoneTyper   ÚBufferzsql.SQLzsql.ComposedÚQueryÚParamsÚConnectionTypezBaseConnection[Any])ÚboundÚPipelineCommandztuple[DumperKey, ...]Ú	DumperKeyÚ	ConnParamÚConnDictÚConnMappingÚRVztuple[int, Wait]zReady | intÚ	PQGenConnr   ÚPQGenc                  ó   — e Zd ZdZddd„Zy)ÚWaitFunczU
    Wait on the connection which generated `PQgen` and return its final result.
    c                 ó   — y ©N© )ÚselfÚgenÚfilenoÚintervals       úR/var/www/html/kelly/kelly-backend/venv/lib/python3.12/site-packages/psycopg/abc.pyÚ__call__zWaitFunc.__call__;   s   € ÐRUó    N).)r0   z	PQGen[RV]r1   Úintr2   ÚfloatÚreturnr'   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r4   r.   r5   r3   r+   r+   6   s   „ ñõ Vr5   r+   úBuffer | NoneÚDumpFuncÚLoadFuncc                  ó4   — e Zd ZdZedd„«       Zedd„«       Zy)ÚAdaptContextaO  
    A context describing how types are adapted.

    Example of `~AdaptContext` are `~psycopg.Connection`, `~psycopg.Cursor`,
    `~psycopg.adapt.Transformer`, `~psycopg.adapt.AdaptersMap`.

    Note that this is a `~typing.Protocol`, so objects implementing
    `!AdaptContext` don't need to explicitly inherit from this class.

    c                 ó   — y)z1The adapters configuration that this object uses.Nr.   ©r/   s    r3   ÚadapterszAdaptContext.adaptersP   s   € ð 	r5   c                 ó   — y)zŠThe connection used by this object, if available.

        :rtype: `~psycopg.Connection` or `~psycopg.AsyncConnection` or `!None`
        Nr.   rC   s    r3   Ú
connectionzAdaptContext.connectionU   ó   € ð 	r5   N©r8   r   ©r8   zBaseConnection[Any] | None)r9   r:   r;   r<   ÚpropertyrD   rF   r.   r5   r3   rA   rA   D   s/   „ ñ	ð òó ðð òó ñr5   rA   c                  óT   — e Zd ZU dZded<   	 ded<   	 ddd„Zdd„Zdd	„Zdd
„Zdd„Z	y)ÚDumperzM
    Convert Python objects of type `!cls` to PostgreSQL representation.
    ú	pq.FormatÚformatr6   ÚoidNc                 ó   — y r-   r.   )r/   ÚclsÚcontexts      r3   Ú__init__zDumper.__init__n   s   € Èr5   c                 ó   — y)zlConvert the object `!obj` to PostgreSQL representation.

        :param obj: the object to convert.
        Nr.   ©r/   Úobjs     r3   ÚdumpzDumper.dumpp   ó   € ð
 	r5   c                 ó   — y)ziConvert the object `!obj` to escaped representation.

        :param obj: the object to convert.
        Nr.   rU   s     r3   ÚquotezDumper.quotew   rX   r5   c                 ó   — y)a¹  Return an alternative key to upgrade the dumper to represent `!obj`.

        :param obj: The object to convert
        :param format: The format to convert to

        Normally the type of the object is all it takes to define how to dump
        the object to the database. For instance, a Python `~datetime.date` can
        be simply converted into a PostgreSQL :sql:`date`.

        In a few cases, just the type is not enough. For example:

        - A Python `~datetime.datetime` could be represented as a
          :sql:`timestamptz` or a :sql:`timestamp`, according to whether it
          specifies a `!tzinfo` or not.

        - A Python int could be stored as several Postgres types: int2, int4,
          int8, numeric. If a type too small is used, it may result in an
          overflow. If a type too large is used, PostgreSQL may not want to
          cast it to a smaller type.

        - Python lists should be dumped according to the type they contain to
          convert them to e.g. array of strings, array of ints (and which
          size of int?...)

        In these cases, a dumper can implement `!get_key()` and return a new
        class, or sequence of classes, that can be used to identify the same
        dumper again. If the mechanism is not needed, the method should return
        the same `!cls` object passed in the constructor.

        If a dumper implements `get_key()` it should also implement
        `upgrade()`.

        Nr.   ©r/   rV   rN   s      r3   Úget_keyzDumper.get_key~   s   € ðD 	r5   c                 ó   — y)aÈ  Return a new dumper to manage `!obj`.

        :param obj: The object to convert
        :param format: The format to convert to

        Once `Transformer.get_dumper()` has been notified by `get_key()` that
        this Dumper class cannot handle `!obj` itself, it will invoke
        `!upgrade()`, which should return a new `Dumper` instance, which will
        be reused for every objects for which `!get_key()` returns the same
        result.
        Nr.   r\   s      r3   ÚupgradezDumper.upgrade¢   s   € ð 	r5   r-   )rQ   r   rR   úAdaptContext | None)rV   r   r8   r=   )rV   r   r8   r   )rV   r   rN   r   r8   r#   ©rV   r   rN   r   r8   rL   )
r9   r:   r;   r<   Ú__annotations__rS   rW   rZ   r]   r_   r.   r5   r3   rL   rL   ^   s6   … ñð Óðð 
ƒHØQäKóóó"ôHr5   rL   c                  ó0   — e Zd ZU dZded<   	 ddd„Zd	d„Zy)
ÚLoaderzK
    Convert PostgreSQL values with type OID `!oid` to Python objects.
    rM   rN   Nc                 ó   — y r-   r.   )r/   rO   rR   s      r3   rS   zLoader.__init__¾   s   € Àsr5   c                 ó   — y)z|
        Convert the data returned by the database into a Python object.

        :param data: the data to convert.
        Nr.   )r/   Údatas     r3   ÚloadzLoader.loadÀ   rG   r5   r-   )rO   r6   rR   r`   )rg   r   r8   r   )r9   r:   r;   r<   rb   rS   rh   r.   r5   r3   rd   rd   ±   s   … ñð Óðô Kôr5   rd   c                  óø   — e Zd ZU ded<   ded<   ddd„Zedd„«       Zedd„«       Zedd	„«       Z	edd
„«       Z
edd„«       Zdddœ	 	 	 	 	 	 	 dd„Zd d„Zd d„Z	 	 	 	 	 	 d!d„Zd"d„Zd#d„Zd$d„Zd%d„Zd&d„Zd'd„Zy)(ÚTransformerztuple[int, ...] | NoneÚtypeszlist[pq.Format] | NoneÚformatsNc                 ó   — y r-   r.   )r/   rR   s     r3   rS   zTransformer.__init__Í   s   € ¸Sr5   c                 ó   — y r-   r.   )rQ   rR   s     r3   Úfrom_contextzTransformer.from_contextÏ   s   € ØHKr5   c                 ó   — y r-   r.   rC   s    r3   rF   zTransformer.connectionÒ   s   € Ø8;r5   c                 ó   — y r-   r.   rC   s    r3   ÚencodingzTransformer.encodingÕ   s   € Ø"r5   c                 ó   — y r-   r.   rC   s    r3   rD   zTransformer.adaptersØ   s   € Ø'*r5   c                 ó   — y r-   r.   rC   s    r3   ÚpgresultzTransformer.pgresultÛ   s   € Ø+.r5   T)Úset_loadersrN   c                ó   — y r-   r.   )r/   Úresultrv   rN   s       r3   Úset_pgresultzTransformer.set_pgresultÞ   s   € ð r5   c                 ó   — y r-   r.   ©r/   rk   rN   s      r3   Úset_dumper_typeszTransformer.set_dumper_typesæ   ó   € ÐQTr5   c                 ó   — y r-   r.   r{   s      r3   Úset_loader_typeszTransformer.set_loader_typesè   r}   r5   c                 ó   — y r-   r.   )r/   Úparamsrl   s      r3   Údump_sequencezTransformer.dump_sequenceê   s   € à"%r5   c                 ó   — y r-   r.   rU   s     r3   Ú
as_literalzTransformer.as_literalî   s   € ¨Sr5   c                 ó   — y r-   r.   r\   s      r3   Ú
get_dumperzTransformer.get_dumperð   s   € Àr5   c                 ó   — y r-   r.   )r/   Úrow0Úrow1Úmake_rows       r3   Ú	load_rowszTransformer.load_rowsò   s   € ÐUXr5   c                 ó   — y r-   r.   )r/   ÚrowrŠ   s      r3   Úload_rowzTransformer.load_rowô   s   € À#r5   c                 ó   — y r-   r.   )r/   Úrecords     r3   Úload_sequencezTransformer.load_sequenceö   r}   r5   c                 ó   — y r-   r.   )r/   rO   rN   s      r3   Ú
get_loaderzTransformer.get_loaderø   s   € Àr5   r-   )rR   r`   )rR   r`   r8   rj   rI   )r8   ÚstrrH   )r8   úPGresult | None)rx   r•   rv   ÚboolrN   zpq.Format | Noner8   ÚNone)rk   zSequence[int]rN   rM   r8   r—   )r�   zSequence[Any]rl   zSequence[PyFormat]r8   úSequence[Buffer | None])rV   r   r8   Úbytesra   )rˆ   r6   r‰   r6   rŠ   úRowMaker[Row]r8   z	list[Row])r�   r6   rŠ   rš   r8   r   )r�   r˜   r8   ztuple[Any, ...])rO   r6   rN   rM   r8   rd   )r9   r:   r;   rb   rS   Úclassmethodro   rJ   rF   rr   rD   ru   ry   r|   r   r‚   r„   r†   r‹   rŽ   r‘   r“   r.   r5   r3   rj   rj   É   sÄ   … Ø!Ó!Ø#Ó#ä@àÚKó ØKàÚ;ó Ø;àÚ"ó Ø"àÚ*ó Ø*àÚ.ó Ø.ð !Ø#'ñàðð ð	ð
 !ðð 
óó UãTð&Ø#ð&Ø.@ð&à	 ó&ó 1ãCãXãEãTäDr5   rj   )=r<   Ú
__future__r   Útypingr   r   r   r   r   r	   r
   r   r   Ú r   Ú_enumsr   Ú_compatr   r   r   r   Úrowsr   r   Úpq.abcr   Úwaitingr   r   Ú_adapters_mapr   Ú_connection_baser   r   r   rb   r™   Ú	bytearrayÚ
memoryviewr   r   r”   r   r    r"   r#   r6   r$   r%   r&   r'   r(   r)   r+   r>   r?   rA   rL   rd   rj   r.   r5   r3   Ú<module>r¨      sÀ  ðòõ #ç 5Ó 5ß @Õ @å Ý (ß 6Ñ 6áÝß#Ý ß$Ý*Ý0á�d“€ˆ$Ó ð ˜% ¨JÐ6Ñ7€ˆ	Ó 7à˜¨¨y¸.ÐHÑI€€yÓ IØ˜( 3™-¨°°c°Ñ):Ð:Ñ;€ˆ	Ó ;ÙÐ)Ð1FÔG€Ø% b¨$ hÑ/€�Ó /Ø˜TÐ#:Ð:Ñ;€	ˆ9Ó ;Ø˜S # t˜^Ñ,€	ˆ9Ó ,Ø˜3 	˜>Ñ*€ˆ)Ó *Ø   i Ñ0€ˆYÓ 0ñ
 ˆTƒ]€à Ð!3°]ÀBÐ!FÑG€	ˆ9Ó Gðð
 ˜V ]°BÐ6Ñ7€€yÓ 7ðôVˆxô Vð  ˜u oÐ5Ñ6€ˆ)Ó 6Ø ˜x¨˜}Ñ-€ˆ)Ó -ô�8ô ô4PˆXô PôfˆXô ô0/E�(õ /Er5   