§
    YŠtj  ã                  ó€  — U d Z ddlmZ ddlmZmZmZmZmZ ddl	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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#e0d         f         Z1de%d<   ee,e2df         Z3de%d<   e4e,e3f         Z5de%d <   ee,e3f         Z6de%d!<    ed"¦  «        Z7ee0e2d#f         d$e7f         Z8de%d%<   	 ed#d$e7f         Z9de%d&<   	  G d'„ d(e¦  «        Z:e
ege)dz  f         Z;de%d)<   e
e)gef         Z<de%d*<    G d+„ d,e¦  «        Z= G d-„ d.e¦  «        Z> G d/„ d0e¦  «        Z? G d1„ d2e¦  «        Z@dS )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                  ó   — e Zd ZdZddd„ZdS )ÚWaitFunczU
    Wait on the connection which generated `PQgen` and return its final result.
    .Úgenú	PQGen[RV]ÚfilenoÚintÚintervalÚfloatÚreturnr(   c                ó   — d S ©N© )Úselfr-   r/   r1   s       úI/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/psycopg/abc.pyÚ__call__zWaitFunc.__call__<   ó   € € € ó    N).)r-   r.   r/   r0   r1   r2   r3   r(   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r9   r6   r;   r8   r,   r,   7   s,   € € € € € ðð ð VÐUÐUÐUÐUÐUÐUr;   r,   ÚDumpFuncÚLoadFuncc                  óB   — e Zd ZdZedd„¦   «         Zed	d„¦   «         ZdS )
Ú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.

    r3   r   c                ó   — dS )z1The adapters configuration that this object uses.Nr6   ©r7   s    r8   ÚadapterszAdaptContext.adaptersQ   s	   € ð 	ˆr;   úBaseConnection[Any] | Nonec                ó   — dS )zŠThe connection used by this object, if available.

        :rtype: `~psycopg.Connection` or `~psycopg.AsyncConnection` or `!None`
        Nr6   rE   s    r8   Ú
connectionzAdaptContext.connectionV   ó	   € ð 	ˆr;   N©r3   r   ©r3   rG   )r<   r=   r>   r?   ÚpropertyrF   rI   r6   r;   r8   rC   rC   E   s^   € € € € € ð	ð 	ð ðð ð ñ „Xðð ðð ð ñ „Xðð ð r;   rC   c                  óV   — 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	dS )ÚDumperzM
    Convert Python objects of type `!cls` to PostgreSQL representation.
    ú	pq.FormatÚformatr0   ÚoidNÚclsr   ÚcontextúAdaptContext | Nonec                ó   — d S r5   r6   )r7   rS   rT   s      r8   Ú__init__zDumper.__init__o   r:   r;   Úobjr   r3   úBuffer | Nonec                ó   — dS )zlConvert the object `!obj` to PostgreSQL representation.

        :param obj: the object to convert.
        Nr6   ©r7   rX   s     r8   ÚdumpzDumper.dumpq   ó	   € ð
 	ˆr;   r   c                ó   — dS )ziConvert the object `!obj` to escaped representation.

        :param obj: the object to convert.
        Nr6   r[   s     r8   ÚquotezDumper.quotex   r]   r;   r   r$   c                ó   — dS )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()`.

        Nr6   ©r7   rX   rQ   s      r8   Úget_keyzDumper.get_key   s
   € ðD 	ˆr;   c                ó   — dS )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.
        Nr6   ra   s      r8   ÚupgradezDumper.upgrade£   s	   € ð 	ˆr;   r5   )rS   r   rT   rU   )rX   r   r3   rY   )rX   r   r3   r   )rX   r   rQ   r   r3   r$   ©rX   r   rQ   r   r3   rO   )
r<   r=   r>   r?   Ú__annotations__rW   r\   r_   rb   rd   r6   r;   r8   rO   rO   _   s¡   € € € € € € ðð ð ÐÐÑðð €H€H�HØQàKÐKÐKÐKÐKðð ð ð ðð ð ð ð"ð "ð "ð "ðHð ð ð ð ð r;   rO   c                  ó2   — e Zd ZU dZded<   	 ddd	„Zdd„ZdS )ÚLoaderzK
    Convert PostgreSQL values with type OID `!oid` to Python objects.
    rP   rQ   NrR   r0   rT   rU   c                ó   — d S r5   r6   )r7   rR   rT   s      r8   rW   zLoader.__init__¿   r:   r;   Údatar   r3   r   c                ó   — dS )z|
        Convert the data returned by the database into a Python object.

        :param data: the data to convert.
        Nr6   )r7   rj   s     r8   ÚloadzLoader.loadÁ   rJ   r;   r5   )rR   r0   rT   rU   )rj   r   r3   r   )r<   r=   r>   r?   rf   rW   rl   r6   r;   r8   rh   rh   ²   sY   € € € € € € ðð ð ÐÐÑðð KÐJÐJÐJÐJðð ð ð ð ð r;   rh   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dAd„¦   «         Z
edBd„¦   «         ZdddœdCd„ZdDd„ZdDd„ZdEd$„ZdFd(„ZdGd+„ZdHd2„ZdId5„ZdJd8„ZdKd;„ZdS )LÚTransformerztuple[int, ...] | NoneÚtypeszlist[pq.Format] | NoneÚformatsNrT   rU   c                ó   — d S r5   r6   )r7   rT   s     r8   rW   zTransformer.__init__Î   r:   r;   r3   c                ó   — d S r5   r6   )rS   rT   s     r8   Úfrom_contextzTransformer.from_contextÐ   s   € ØHKÈr;   rG   c                ó   — d S r5   r6   rE   s    r8   rI   zTransformer.connectionÓ   s   € Ø8;¸r;   Ústrc                ó   — d S r5   r6   rE   s    r8   ÚencodingzTransformer.encodingÖ   s   € Ø"˜sr;   r   c                ó   — d S r5   r6   rE   s    r8   rF   zTransformer.adaptersÙ   s   € Ø'* sr;   úPGresult | Nonec                ó   — d S r5   r6   rE   s    r8   ÚpgresultzTransformer.pgresultÜ   s   € Ø+.¨3r;   T)Úset_loadersrQ   Úresultr|   ÚboolrQ   úpq.Format | NoneÚNonec               ó   — d S r5   r6   )r7   r}   r|   rQ   s       r8   Úset_pgresultzTransformer.set_pgresultß   s	   € ð ˆsr;   úSequence[int]rP   c                ó   — d S r5   r6   ©r7   ro   rQ   s      r8   Úset_dumper_typeszTransformer.set_dumper_typesç   r:   r;   c                ó   — d S r5   r6   r…   s      r8   Úset_loader_typeszTransformer.set_loader_typesé   r:   r;   ÚparamsúSequence[Any]úSequence[PyFormat]úSequence[Buffer | None]c                ó   — d S r5   r6   )r7   r‰   rp   s      r8   Údump_sequencezTransformer.dump_sequenceë   s   € à"% #r;   rX   r   Úbytesc                ó   — d S r5   r6   r[   s     r8   Ú
as_literalzTransformer.as_literalï   r:   r;   r   rO   c                ó   — d S r5   r6   ra   s      r8   Ú
get_dumperzTransformer.get_dumperñ   r:   r;   Úrow0r0   Úrow1Úmake_rowúRowMaker[Row]ú	list[Row]c                ó   — d S r5   r6   )r7   r”   r•   r–   s       r8   Ú	load_rowszTransformer.load_rowsó   r:   r;   Úrowr   c                ó   — d S r5   r6   )r7   r›   r–   s      r8   Úload_rowzTransformer.load_rowõ   r:   r;   Úrecordútuple[Any, ...]c                ó   — d S r5   r6   )r7   rž   s     r8   Úload_sequencezTransformer.load_sequence÷   r:   r;   rR   rh   c                ó   — d S r5   r6   )r7   rR   rQ   s      r8   Ú
get_loaderzTransformer.get_loaderù   r:   r;   r5   )rT   rU   )rT   rU   r3   rn   rL   )r3   ru   rK   )r3   ry   )r}   ry   r|   r~   rQ   r   r3   r€   )ro   rƒ   rQ   rP   r3   r€   )r‰   rŠ   rp   r‹   r3   rŒ   )rX   r   r3   r�   re   )r”   r0   r•   r0   r–   r—   r3   r˜   )r›   r0   r–   r—   r3   r   )rž   rŒ   r3   rŸ   )rR   r0   rQ   rP   r3   rh   )r<   r=   r>   rf   rW   Úclassmethodrs   rM   rI   rw   rF   r{   r‚   r†   rˆ   rŽ   r‘   r“   rš   r�   r¡   r£   r6   r;   r8   rn   rn   Ê   sF  € € € € € € Ø!Ð!Ð!Ñ!Ø#Ð#Ð#Ñ#à@Ð@Ð@Ð@Ð@àØKÐKÐKñ „[ØKàØ;Ð;Ð;ñ „XØ;àØ"Ð"Ð"ñ „XØ"àØ*Ð*Ð*ñ „XØ*àØ.Ð.Ð.ñ „XØ.ð !Ø#'ðð ð ð ð ð ð UÐTÐTÐTàTÐTÐTÐTð&ð &ð &ð &ð 1Ð0Ð0Ð0àCÐCÐCÐCàXÐXÐXÐXàEÐEÐEÐEàTÐTÐTÐTàDÐDÐDÐDÐDÐDr;   rn   )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   rf   r�   Ú	bytearrayÚ
memoryviewr   r   r   ru   r    r!   r#   Útupler$   r0   r%   Údictr&   r'   r(   r)   r*   r,   r@   rA   rC   rO   rh   rn   r6   r;   r8   ú<module>r´      s  ððð ð ð #Ð "Ð "Ð "Ð "Ð "à AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ BÐ BÐ BÐ BÐ BÐ BÐ BÐ BÐ BÐ BÐ BÐ Bà Ð Ð Ð Ð Ð Ø (Ð (Ð (Ð (Ð (Ð (Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5àð 1ØÐÐÐÐÐØ#Ð#Ð#Ð#Ð#Ð#Ð#Ð#Ø Ð Ð Ð Ð Ð Ø$Ð$Ð$Ð$Ð$Ð$Ð$Ð$Ø*Ð*Ð*Ð*Ð*Ð*Ø0Ð0Ð0Ð0Ð0Ð0à��d‘”€Ð Ð Ð Ñ ð ˜% ¨JÐ6Ô7€Ð 7Ð 7Ð 7Ñ 7à" =°%¸ÀNÐ#RÔS€Ð SÐ SÐ SÑ SØ˜¨(Ð2Ô3€Ð 3Ð 3Ð 3Ñ 3Ø˜( 3œ-¨°°c°Ô):Ð:Ô;€Ð ;Ð ;Ð ;Ñ ;Ø�Ð)Ð1FÐGÑGÔG€Ø% b¨$ hÔ/€Ð /Ð /Ð /Ñ /Ø˜T 5Ð)9Ô#:Ð:Ô;€	Ð ;Ð ;Ð ;Ñ ;Ø˜S # t˜^Ô,€	Ð ,Ð ,Ð ,Ñ ,Ø˜3 	˜>Ô*€Ð *Ð *Ð *Ñ *Ø   i Ô0€Ð 0Ð 0Ð 0Ñ 0ð
 €WˆT�]„]€à   s¨F {Ô!3°]ÀBÐ!FÔG€	Ð GÐ GÐ GÑ Gðð
 ˜V ]°BÐ6Ô7€Ð 7Ð 7Ð 7Ñ 7ððVð Vð Vð Vð Vˆxñ Vô Vð Vð  ˜u f¨t¡mÐ3Ô4€Ð 4Ð 4Ð 4Ñ 4Ø ˜x¨˜}Ô-€Ð -Ð -Ð -Ñ -ðð ð ð ð �8ñ ô ð ð4Pð Pð Pð Pð PˆXñ Pô Pð Pðfð ð ð ð ˆXñ ô ð ð0/Eð /Eð /Eð /Eð /E�(ñ /Eô /Eð /Eð /Eð /Er;   