ó
    Ð]j  ã                  óì  • % S r SSKJr  SSKJrJrJrJrJr  SSK	J
r
JrJrJr  SSKJr  SSKJr  SSKJrJrJr  \(       a(  SS	KJr  SS
KJrJr  SSKJr  SSKJrJr  SSKJ r   SSK!J"r"  \#" S5      r$S\%S'   \\&\'\(4   r)S\%S'   \\\&SS4   r*S\%S'   \\*\4   r+S\%S'   \\\   \\,\4   4   r-S\%S'   \" SSS9r.\
/ S4   r/S\%S'   \\#\0S   4   r1S\%S'   \\,\2S4   r3S\%S'   \4\,\34   r5S\%S '   \\,\34   r6S\%S!'   \" S"5      r7\\0\2S#4   S$\74   r8S\%S%'    \S#S$\74   r9S\%S&'     " S' S(\5      r:\
\/\)S-  4   r;S\%S)'   \
\)/\4   r<S\%S*'    " S+ S,\5      r= " S- S.\5      r> " S/ S0\5      r? " S1 S2\5      r@g)3zN
Protocol objects representing different implementations of the same classes.
é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚProtocolÚ	TypeAliasÚUnion)ÚCallableÚ	GeneratorÚMappingÚSequenceé   )Úpq)ÚPyFormat)ÚLiteralStringÚTemplateÚTypeVar)Úsql)ÚRowÚRowMaker)ÚPGresult)ÚReadyÚWait)ÚAdaptersMap)ÚBaseConnectionNÚtypeÚNoneTyper   ÚBufferzsql.SQLzsql.ComposedÚQueryNoTemplateÚQueryÚParamsÚConnectionTypezBaseConnection[Any])ÚboundÚPipelineCommand)Ú	DumperKey.r$   Ú	ConnParamÚConnDictÚConnMappingÚRVr   zReady | intÚ	PQGenConnÚPQGenc                  ó&   • \ rS rSrSrSSS jjrSrg)ÚWaitFuncé7   zM
Wait on the connection which generated `PQgen` and return its final result.
c                ó   • g ©N© )ÚselfÚgenÚfilenoÚintervals       ÚH/home/mande/repo/quber/.venv/lib/python3.13/site-packages/psycopg/abc.pyÚ__call__ÚWaitFunc.__call__<   s   € ÐRUó    r0   N).)r2   z	PQGen[RV]r3   Úintr4   ÚfloatÚreturnr(   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r6   Ú__static_attributes__r0   r8   r5   r,   r,   7   s   † ñ÷ VÑUr8   r,   ÚDumpFuncÚLoadFuncc                  ó@   • \ rS rSrSr\SS j5       r\SS j5       rSrg)	ÚAdaptContextéE   a7  
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                ó   • g)z1The adapters configuration that this object uses.Nr0   ©r1   s    r5   ÚadaptersÚAdaptContext.adaptersQ   s   € ð 	r8   c                ó   • g)zzThe connection used by this object, if available.

:rtype: `~psycopg.Connection` or `~psycopg.AsyncConnection` or `!None`
Nr0   rH   s    r5   Ú
connectionÚAdaptContext.connectionV   ó   € ð 	r8   r0   N©r;   r   ©r;   zBaseConnection[Any] | None)	r<   r=   r>   r?   r@   ÚpropertyrI   rL   rA   r0   r8   r5   rE   rE   E   s/   † ñ	ð óó ðð óó ór8   rE   c                  óh   • \ rS rSr% SrS\S'    S\S'    SSS jjrSS	 jrSS
 jrSS jr	SS jr
Srg)ÚDumperé_   zE
Convert Python objects of type `!cls` to PostgreSQL representation.
ú	pq.FormatÚformatr9   ÚoidNc                ó   • g r/   r0   )r1   ÚclsÚcontexts      r5   Ú__init__ÚDumper.__init__o   s   € Èr8   c                ó   • g)z\Convert the object `!obj` to PostgreSQL representation.

:param obj: the object to convert.
Nr0   ©r1   Úobjs     r5   ÚdumpÚDumper.dumpq   ó   € ð
 	r8   c                ó   • g)zYConvert the object `!obj` to escaped representation.

:param obj: the object to convert.
Nr0   r^   s     r5   ÚquoteÚDumper.quotex   rb   r8   c                ó   • g)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()`.

Nr0   ©r1   r_   rV   s      r5   Úget_keyÚDumper.get_key   s   € ðD 	r8   c                ó   • g)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.
Nr0   rg   s      r5   ÚupgradeÚDumper.upgrade£   s   € ð 	r8   r0   r/   )rY   r   rZ   úAdaptContext | None)r_   r   r;   zBuffer | None)r_   r   r;   r   )r_   r   rV   r   r;   r$   ©r_   r   rV   r   r;   rS   )r<   r=   r>   r?   r@   Ú__annotations__r[   r`   rd   rh   rk   rA   r0   r8   r5   rS   rS   _   s6   ‡ ñð Óðð 
ƒHØQæKôôô"÷Hr8   rS   c                  ó>   • \ rS rSr% SrS\S'    S	S
S jjrSS jrSrg)ÚLoaderé²   zC
Convert PostgreSQL values with type OID `!oid` to Python objects.
rU   rV   Nc                ó   • g r/   r0   )r1   rW   rZ   s      r5   r[   ÚLoader.__init__¿   s   € Àsr8   c                ó   • g)zd
Convert the data returned by the database into a Python object.

:param data: the data to convert.
Nr0   )r1   Údatas     r5   ÚloadÚLoader.loadÁ   rN   r8   r0   r/   )rW   r9   rZ   rm   )rv   r   r;   r   )	r<   r=   r>   r?   r@   ro   r[   rw   rA   r0   r8   r5   rq   rq   ²   s   ‡ ñð Óðö K÷r8   rq   c                  ó$  • \ rS rSr% S\S'   S\S'   SSS jjr\SS j5       r\SS	 j5       r	\SS
 j5       r
\SS j5       r\S S j5       rSSS.       S!S j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S)S jrSrg)*ÚTransformeréÊ   ztuple[int, ...] | NoneÚtypeszlist[pq.Format] | NoneÚformatsNc                ó   • g r/   r0   )r1   rZ   s     r5   r[   ÚTransformer.__init__Î   s   € ¸Sr8   c                ó   • g r/   r0   )rY   rZ   s     r5   Úfrom_contextÚTransformer.from_contextÐ   s   € ØHKr8   c                ó   • g r/   r0   rH   s    r5   rL   ÚTransformer.connectionÓ   s   € Ø8;r8   c                ó   • g r/   r0   rH   s    r5   ÚencodingÚTransformer.encodingÖ   s   € Ø"r8   c                ó   • g r/   r0   rH   s    r5   rI   ÚTransformer.adaptersÙ   s   € Ø'*r8   c                ó   • g r/   r0   rH   s    r5   ÚpgresultÚTransformer.pgresultÜ   s   € Ø+.r8   T)Úset_loadersrV   c               ó   • g r/   r0   )r1   Úresultr�   rV   s       r5   Úset_pgresultÚTransformer.set_pgresultß   s   € ð r8   c                ó   • g r/   r0   ©r1   r|   rV   s      r5   Úset_dumper_typesÚTransformer.set_dumper_typesç   ó   € ÐQTr8   c                ó   • g r/   r0   r“   s      r5   Úset_loader_typesÚTransformer.set_loader_typesé   r–   r8   c                ó   • g r/   r0   )r1   Úparamsr}   s      r5   Údump_sequenceÚTransformer.dump_sequenceë   s   € à"%r8   c                ó   • g r/   r0   r^   s     r5   Ú
as_literalÚTransformer.as_literalï   s   € ¨Sr8   c                ó   • g r/   r0   rg   s      r5   Ú
get_dumperÚTransformer.get_dumperñ   s   € Àr8   c                ó   • g r/   r0   )r1   Úrow0Úrow1Úmake_rows       r5   Ú	load_rowsÚTransformer.load_rowsó   s   € ÐUXr8   c                ó   • g r/   r0   )r1   Úrowr§   s      r5   Úload_rowÚTransformer.load_rowõ   s   € À#r8   c                ó   • g r/   r0   )r1   Úrecords     r5   Úload_sequenceÚTransformer.load_sequence÷   r–   r8   c                ó   • g r/   r0   )r1   rW   rV   s      r5   Ú
get_loaderÚTransformer.get_loaderù   s   € Àr8   r0   r/   )rZ   rm   )rZ   rm   r;   rz   rP   )r;   ÚstrrO   )r;   úPGresult | None)r�   r¶   r�   ÚboolrV   zpq.Format | Noner;   ÚNone)r|   zSequence[int]rV   rU   r;   r¸   )r›   zSequence[Any]r}   zSequence[PyFormat]r;   úSequence[Buffer | None])r_   r   r;   Úbytesrn   )r¥   r9   r¦   r9   r§   úRowMaker[Row]r;   z	list[Row])r«   r9   r§   r»   r;   r   )r¯   r¹   r;   ztuple[Any, ...])rW   r9   rV   rU   r;   rq   )r<   r=   r>   r?   ro   r[   Úclassmethodr�   rQ   rL   r†   rI   r‹   r�   r”   r˜   rœ   rŸ   r¢   r¨   r¬   r°   r³   rA   r0   r8   r5   rz   rz   Ê   sÄ   ‡ Ø!Ó!Ø#Ó#æ@àÛKó ØKàÛ;ó Ø;àÛ"ó Ø"àÛ*ó Ø*àÛ.ó Ø.ð !Ø#'ñàðð ð	ð
 !ðð 
õô UäTð&Ø#ð&Ø.@ð&à	 ô&ô 1äCäXäEäTçDr8   rz   )Ar@   Ú
__future__r   Útypingr   r   r   r   r   Úcollections.abcr	   r
   r   r   Ú r   Ú_enumsr   Ú_compatr   r   r   r   Úrowsr   r   Úpq.abcr   Úwaitingr   r   Ú_adapters_mapr   Ú_connection_baser   r   r   ro   rº   Ú	bytearrayÚ
memoryviewr   r   r   rµ   r    r!   r#   Útupler$   r9   r%   Údictr&   r'   r(   r)   r*   r,   rB   rC   rE   rS   rq   rz   r0   r8   r5   Ú<module>rÌ      så  ðòõ #ç AÕ Aß BÓ Bå Ý (ß 5Ñ 5æÝß#Ý ß$Ý*Ý0á�d“€ˆ$Ó ð ˜% ¨JÐ6Ñ7€ˆ	Ó 7à" =°%¸ÀNÐ#RÑS€�Ó SØ˜¨(Ð2Ñ3€€yÓ 3Ø˜( 3™-¨°°c°Ñ):Ð:Ñ;€ˆ	Ó ;ÙÐ)Ð1FÑG€Ø% b¨$ hÑ/€�Ó /Ø˜T 5Ð)9Ñ#:Ð:Ñ;€	ˆ9Ó ;Ø˜S # t˜^Ñ,€	ˆ9Ó ,Ø˜3 	˜>Ñ*€ˆ)Ó *Ø   i Ñ0€ˆYÓ 0ñ
 ˆTƒ]€à   s¨F {Ñ!3°]ÀBÐ!FÑG€	ˆ9Ó Gðð
 ˜V ]°BÐ6Ñ7€€yÓ 7ðôVˆxô Vð  ˜u f¨t¡mÐ3Ñ4€ˆ)Ó 4Ø ˜x¨˜}Ñ-€ˆ)Ó -ô�8ô ô4PˆXô PôfˆXô ô0/E�(õ /Er8   