§
    öÛgR  ã                   óè  — d Z ddlZddlZddlZddlmZmZ ddlmZ ddl	m
Z
  e
d¦  «        Z e
d¦  «        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 n# e$ r Y nw xY wdZdZdZej        j        ej        j        ej         j        ej         j        ej!        j        ej!        j        iZ"d„ Z#dj$        Z% G d„ de&e¬¦  «        Z' G d„ de'¦  «        Z( G d„ de'¦  «        Z) G d„ de'¦  «        Z*dS )z"PQ version 3.0 client transactionsé    N)ÚABCMetaÚabstractmethod)Úchain)Ú
itemgetteré   é   )ÚComposition)Úelement3)Úmd5)Úcrypt)Úconsume_tuple_messagesTF©NNc                 ó   — | S ©N© )Úxs    úO/granary/edev/quantum/lib/python3.11/site-packages/postgresql/protocol/xact3.pyÚ
return_argr   #   s   € Ø	€ó    zEexpected message of types {expected}, but received {received} insteadc                   ó,   — e Zd ZdZdZed„ ¦   «         ZdS )ÚTransactionz‰
	If the fatal attribute is not None, an error occurred, and the
	`error_message` attribute should be set to a element3.Error instance.
	Nc                 ó   — dS )zK
		Return an iterable to the messages received that have been processed.
		Nr   ©Úselfs    r   Úmessages_receivedzTransaction.messages_received1   s   € € € r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úfatalr   r   r   r   r   r   r   *   s>   € € € € € ðð ð 
€àðð ñ „.ðð ð r   r   )Ú	metaclassc                   óD   — e Zd ZdZ ej        d¦  «        Zd„ Zd„ Zd„ Z	dS )ÚClosingzB
	Send the disconnect message and mark the connection as closed.
	)©ó   SÚFATAL)ó   CÚ08003)ó   Mzoperation on closed connection)ó   HzBA new connection needs to be created in order to query the server.c                 ó   — dS ©Nr   r   r   s    r   r   zClosing.messages_receivedD   s   € Ø	ˆr   c                 ó:   — d| _         d| _        t          | _        dS )z'
		Empty messages and mark complete.
		r   TN)Úmessagesr    ÚCompleteÚstater   s    r   ÚsentzClosing.sentG   s   € ð €$„-Ø€$„*Ý€$„*€*€*r   c                 óP   — t           j        f| _        t          | j        f| _        d S r   )ÚelementÚDisconnectMessager.   ÚSendingr1   r0   r   s    r   Ú__init__zClosing.__init__O   s!   € ÝÔ,Ð.€$„-Ý˜œÐ#€$„*€*€*r   N)
r   r   r   r   r3   ÚClientErrorÚerror_messager   r1   r6   r   r   r   r#   r#   7   sf   € € € € € ðð ð %�Ô$ð &ñ ô €ðð ð ðð ð ð$ð $ð $ð $ð $r   r#   c                   óJ   — e Zd ZdZdZ	 	 	 	 dd„Zd„ Zd	„ Zd
„ Zd„ Z	d„ Z
d„ ZdS )ÚNegotiationaÚ  
	Negotiation is a protocol transaction used to manage the initial stage of a
	connection to PostgreSQL.

	This transaction revolves around the `state_machine` method which is a
	generator that takes individual messages and progresses the state of the
	connection negotiation. This was chosen over the route taken by
	`Transaction`, seen later, as it's not terribly performance intensive and
	there are many conditions which make a generator ideal for managing the
	state.
	NÚstartup_messageústartup message to sendÚpasswordú,password source data(encoded password bytes)c                 ó  — || _         || _        dg| _        g | _        d | _        d | _        d | _        d | _        |                      ¦   «         | _	        t          | j	        ¦  «        | _        t          | j        f| _        d S r,   )r;   r=   ÚreceivedÚasyncsÚauthtypeÚkillinfoÚauthokÚ
last_readyÚstate_machineÚmachineÚnextr.   r5   r1   r0   )r   r;   r=   s      r   r6   zNegotiation.__init__a   su   € ð )€$ÔØ€$„-Ø�$€$„-Ø€$„+Ø€$„-Ø€$„-Ø€$„+Ø€$„/Ø×#Ò#Ñ%Ô%€$„,Ý�t”|Ñ$Ô$€$„-Ý˜œÐ#€$„*€*€*r   c                 óÈ   — t          | ¦  «        j        dz   t          | ¦  «        j        z   }|t          j        | j        | j        f¦  «                             ¦   «         z  }|S )Nú.)Útyper   r   ÚpprintÚpformatr;   r=   Úlstrip)r   Úss     r   Ú__repr__zNegotiation.__repr__q   sR   € Ý
ˆ4�j„jÔ˜cÑ!¥D¨¡J¤JÔ$7Ñ7€!Ø…v„~�tÔ+¨T¬]Ð;Ñ<Ô<×CÒCÑEÔEÑE€!Ø	
€(r   c                 ó   — | j         S r   )Ú	processedr   s    r   r   zNegotiation.messages_receivedv   s
   € Ø	ŒÐr   c                 ó:   — d| _         t          | j        f| _        dS ©z¾
		Empty messages and switch state to receiving.

		This is called by the user after the `messages` have been sent to the
		remote end. That is, this merely finalizes the "Sending" state.
		r   N)r.   Ú	ReceivingÚput_messagesr0   r   s    r   r1   zNegotiation.senty   ó   € ð €$„-Ý˜4Ô,Ð-€$„*€*€*r   c                 ó¢  — d}|| j         d         ur| j                              |¦  «         nt          d¦  «        ‚d}	 |D ]Ò}|dz  }|d         t          j        j        k    rI| j        €At          j                             |d         ¦  «        | _        d| _        t          | _
        |c S Œk|d         t          v r:| j                             t          |d                  |d         ¦  «        ¦  «         Œ´| j                             |¦  «        }|r nŒÓn# t          $ r t          | _
        |cY S w xY w|r|| _        t"          | j        f| _
        |S )Nr   éÿÿÿÿznegotiation was interruptedr   r   T)r@   ÚappendÚRuntimeErrorr3   ÚErrorrK   r    Úparser8   r/   r0   ÚAsynchronousMaprA   rG   ÚsendÚStopIterationr.   r5   r1   )r   r.   Úout_messagesÚcountr   s        r   rV   zNegotiation.put_messagesƒ   sz  € à€,Ø�T”] 2Ô&Ð&Ð&Ø„=×Ò˜Ñ!Ô!Ð!Ð!å	Ð3Ñ	4Ô	4Ð4ð €%ðØð ð €qØ	ˆQ�J€EØˆ„t�wŒ}Ô!Ò!Ð!ØŒ
ÐÝ"œ=×.Ò.¨q°¬tÑ4Ô4€dÔØ€d„jÝ€d„jØ€l€l€lð	 	ð
 
ˆ1Œ•Ð	 Ð	 Ø	„[×ÒÝ�a˜”dÔ˜A˜aœDÑ!Ô!ñô ð ð ð ”L×%Ò% aÑ(Ô(€\Øð Ø€eðøøå	ð ð ð å€4„:Ø
€<€<€<ðøøøð
 ð %Ø€4„=Ý˜$œ)Ð$€4„:Ø	€,s   ¿A+D Â+A)D ÄD0Ä/D0c           
      ó°   — d| _         t          j        ddddt          j                             |d¦  «        |fz  fdf¦  «        | _        t          | _        d S )NTr$   )r'   z--AUTr)   z)unsupported authentication request %r(%d)ú	<unknown>)r*   zF'postgresql.protocol' only supports: MD5, crypt, plaintext, and trust.)r    r3   r7   ÚAuthNameMapÚgetr8   r/   r0   )r   Úreqs     r   Úunsupported_auth_requestz$Negotiation.unsupported_auth_request¨   si   € Ø€$„*ÝÔ*ØØØÐ
5ÝÔ×Ò˜C Ñ-Ô-¨sð8ñ ð ð Tð,ñ ô €$Ôõ €$„*€*€*r   c              #   óÐ  K  — | j         fV —}|d         t          j        j        k    rKd| _        t          j        dddt          t          j        j        |d         ¬¦  «        ff¦  «        | _        dS t          j                             |d         ¦  «        | _	        | j	        j
        }|t          j        k    �rÑ|t          j        k    r| j        }nã|t          j        k    r t          | j        | j	        j        ¦  «        }n³|t          j        k    rŒt%          | j        | j         d	         z   ¦  «                             ¦   «                              d
¦  «        }dt%          || j	        j        z   ¦  «                             ¦   «                              d
¦  «        z   }n|                      |¦  «         dS t          j        |¦  «        fV —}t          j                             |d         ¦  «        | _        | j        j
        t          j        k    rzd| _        t          j        ddddt1          t          j                             | j        j
        d¦  «        ¦  «        ›dt1          | j        j
        ¦  «        ›d�ff¦  «        | _        dS n| j	        | _        dV —}|d         t          j        j        k    rXd| _        t          j        dddt          t          j        j        t1          |d         ¦  «        ¬¦  «        ff¦  «        | _        dS t          j                             |d         ¦  «        | _        dV —}|d         t          j        j        k    red| _        t          j        dddt          t1          t          j        j        ¦  «        t1          |d         ¦  «        ¬¦  «        ff¦  «        | _        dS t          j                             |d         ¦  «        | _        dS )zH
		Generator keeping the state of the connection negotiation process.
		r   Tr$   ©r'   Ú08P01r)   ©Úexpectedr@   Nr   s   userÚasciis   md5z:expected OK from the authentication message, but received rd   ú(z	) instead)r;   r3   ÚAuthenticationrK   r    r7   Úmessage_expectationr8   r]   rB   ÚrequestÚAuthRequest_OKÚAuthRequest_Cleartextr=   ÚAuthRequest_Cryptr   ÚsaltÚAuthRequest_MD5r   Ú	hexdigestÚencoderh   ÚPasswordrD   Úreprre   rf   ÚKillInformationrC   ÚReadyrE   )r   r   rg   Úpws       r   rF   zNegotiation.state_machine´   s¬  è è € ð Ô"Ð$Ð$Ð$€!à€q„T�WÔ#Ô(Ò(Ð(Ø€4„:ÝÔ+ØØØ	ÕÝÔ&Ô+Ø�!”ðñ ô ð ð-ñ ô €4Ôð 
€6åÔ(×.Ò.¨q°¬tÑ4Ô4€$„-àŒÔ€#Ø�GÔ"Ò"Ñ"Ø	�WÔ*Ò*Ð*Ø	Œ€B€BØ�wÔ(Ò(Ð(Ý	ˆtŒ}˜dœmÔ0Ñ	1Ô	1€B€BØ�wÔ&Ò&Ð&Ý	ˆTŒ]˜TÔ1°'Ô:Ñ:Ñ	;Ô	;×	EÒ	EÑ	GÔ	G×	NÒ	NÈwÑ	WÔ	W€BØ	•#�b˜4œ=Ô-Ñ-Ñ.Ô.×8Ò8Ñ:Ô:×AÒAÀ'ÑJÔJÑ	J€B€Bð 	×!Ò! #Ñ&Ô&Ð&Ø
€FÝÔ Ñ#Ô#Ð%Ð%Ð%€1åÔ'×-Ò-¨a°¬dÑ3Ô3€4„;Ø
„kÔ�WÔ3Ò3Ð3Ø€D„JÝ Ô,ØØØ
€då�GÔ×#Ò#ØŒÔ˜[ñ	ô 	ñ 
ô 
ð 
ð 
õ ˆDŒKÔÑ Ô Ð Ð ðð ð.ñ ô €DÔð €Fð 4ð  ”€4„;ð €z€z€!Ø€q„T�WÔ$Ô)Ò)Ð)Ø€4„:ÝÔ+ØØØ	ÕÝÔ'Ô,Ý�Q�q”T‘
”
ðñ ô ð ð-ñ ô €4Ôð 
€6ÝÔ)×/Ò/°°!´Ñ5Ô5€$„-à€z€z€!Ø€q„T�WŒ]ÔÒÐØ€4„:ÝÔ+ØØØ	ÕÝ•W”]Ô'Ñ(Ô(Ý�Q�q”T‘
”
ðñ ô ð ð-ñ ô €4Ôð 
€6Ý”M×'Ò'¨¨!¬Ñ-Ô-€$„/€/€/r   )r;   r<   r=   r>   )r   r   r   r   r0   r6   rP   r   r1   rV   rh   rF   r   r   r   r:   r:   S   s©   € € € € € ð
ð 
ð 
€ð$Ø-ð$à;ð$ð $ð $ð $ð ð ð ð
ð ð ð.ð .ð .ð#ð #ð #ðJ
ð 
ð 
ðU.ð U.ð U.ð U.ð U.r   r:   c                   ó|  — e Zd ZdZdZ ej        d¦  «        Zej        j	        ej
        j	        ej
        j        dfej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfiej        j	        ej        j        dfiej        j	        edfej        j	        ej        j        dfiej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfifej        j	        ej        j	        ej        j        dfiej        j	        ej        j        dfifej        j	        ej        j	        ej        j        dfifej        j	        ej        j	        ej        j        dfifej        j	        ej        j	        ej        j        dfej
        j	        ej
        j        dfiej        j	        ej        j        dfej
        j	        ej
        j        dfifej        j	        ej        j	        ej        j        dfifej         j	        ej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfej        j	        ej        j        dfiej        j	        ej        j        dfej!        j	        ej!        j        dfej        j	        ej        j        dfiej        j	        edfej        j	        ej        j        dfiej        j	        ej        j        dfifej"        j	        ej        j	        ej        j        dfifej#        j	        di	Z$dZ%efd	„Z&d
j'        fd„Z(d„ Z)e*j+        e, e-e.e/f¦  «        e/fd„Z0ej         j	        ej        j	        z   ej1        j	        ej        j	        ej1        j        e2fd„Z3d„ Z4	 e5fd„Z6n%# e7$ r ej        j        ej        j	        fd„Z6Y nw xY wd„ Z8e8Z9d„ Z:dS )ÚInstructionaÔ  
	Manage the state of a sequence of request messages to be sent to the server.
	It provides the messages to be sent and takes the response messages for order
	and integrity validation:

		Instruction([.element3.Message(), ..])

	A message must be one of:

		* `.element3.Query`
		* `.element3.Function`
		* `.element3.Parse`
		* `.element3.Bind`
		* `.element3.Describe`
		* `.element3.Close`
		* `.element3.Execute`
		* `.element3.Synchronize`
		* `.element3.Flush`
	Ns   invalid terminationé   r   r   r   )r   ©r   r   r‚   c                 ó"  — t          |¦  «        | _        || _        g | _        | j        | _        t          | j        ¦  «        | _        t          | j	        f| _
        d| _        | j        D ]%}|j        | j        vrt          d|j        ¦  «        ‚Œ&dS )ac  
		Initialize an `Instruction` instance using the given commands.

		Commands are `postgresql.protocol.element3.Message` instances:

		 * `.element3.Query`
		 * `.element3.Function`
		 * `.element3.Parse`
		 * `.element3.Bind`
		 * `.element3.Describe`
		 * `.element3.Close`
		 * `.element3.Execute`
		 * `.element3.Synchronize`
		 * `.element3.Flush`
		Nz(unknown message type for PQ 3.0 protocol)ÚtupleÚcommandsÚ	asynchookÚ	completedÚinitial_stateÚlastÚlistr.   r5   Ústandard_sentr0   r    rK   ÚhookÚ	TypeError)r   r…   r†   Úcmds       r   r6   zInstruction.__init__Ž  s˜   € õ" ˜‘/”/€$„-Ø€$„.Ø€$„.ØÔ €$„)Ý�t”}Ñ%Ô%€$„-Ý˜Ô+Ð,€$„*Ø€$„*àŒ]ð ð €cØ	„h�d”iÐÐÝ
Ø/°´ñô ð ð  ðð r   z{mod}.{name}({nl}{args})c                 óª   —  |t          | ¦  «        j        t          | ¦  «        j        t          j        t          j        | j        ¦  «        ¬¦  «        S )N)ÚmodÚnameÚnlÚargs)rK   r   r   ÚosÚlineseprL   rM   r…   )r   Úformats     r   rP   zInstruction.__repr__­  sG   € Ø	ˆÝ	ˆd‰ŒÔ	Ý
ˆt‰*Œ*Ô
Ý
Œ
Ý
Œ.˜œÑ
'Ô
'ð	
ñ 
ô 
ð r   c                 óZ   — t          j        t          t          | j        ¦  «        ¦  «        S )zReceived and validate messages)r   Úfrom_iterableÚmapÚget1r‡   r   s    r   r   zInstruction.messages_receivedµ  s   € å	Ô	�S¥ t¤~Ñ6Ô6Ñ	7Ô	7Ð7r   c                 óH   —  | || || j         ¦  «        ¦  «        ¦  «        S )z^
		A iterator that producing the completed messages in reverse
		order. Last in, first out.
		)r‡   )r   Úchainingr™   Ú	transformÚreverseds        r   ÚreversezInstruction.reverse¹  s,   € ð 
ˆ�#�#�i  ¨$¬.Ñ!9Ô!9Ñ:Ô:Ñ	;Ô	;Ð;r   c                 óÖ  — | j         } ||¦  «        }| j        }	|| j        d         u r| j        d         \  }
}n| j        d         \  }
}g | _        ||
         }|	|j                 }g }d}|D �]†}|dz  }||                              |d         d¦  «        \  }}|�€é|d         |k    rÌ ||d         ¦  «        }|d                              ¦   «         dk    x| _        }|| _        |du rt          | _
        |c S |j        t          j        j        t          j        j        fvr9t          |
|¦  «        D ]}
||
         t          j        u r nŒt          | _
        |c S ||
         }|	|j                 }d}�Œ|d         t           v r“|| j        vrˆt!          |d                  |d         ¦  «        }	 |                      |¦  «         n6# t$          $ r)}t'          j        t'          j        ¦   «         Ž  Y d}~nd}~ww xY w| j                             |¦  «         �Œªd| _        t          j        d	d
dt1          t3          ||                              ¦   «         ¦  «        |d         ¬¦  «        ff¦  «        | _        t          | _
        |c S  ||d         ¦  «        }|                     |¦  «         |�|}�ŒEd}|j        |k    r|j        | _        d}|€#|
dz  }
|
|k    rn||
         }|	|j                 }|®#�Œ‡ | j        r$| j        d         d         t=          |¦  «        k    r)| j                             t=          |¦  «        |f¦  «         || j        d         |
|ff| _        |
|k    rt          | _
        n÷|j        |v rî|rì|d         }|j        t@          u rtB          | j"        f| _
        nÂ|j        t2          u rtB          | j#        f| _
        n |j        t          j$        j        k    rY| j%        f| j         |
dz   d…         z   | _&        t          j'        f| j         |
dz   d…         z   | _(        tR          | j*        f| _
        n-|j        t          j+        j        k    rtB          | j"        f| _
        |S )zì
		Attempt to forward the state of the transaction using the given
		messages. "put" messages into the transaction for processing.

		If an invalid command is initialized on the `Transaction` object, an
		`IndexError` will be thrown.
		r   r   r   r   Nr%   s   ERRORTr$   rj   r)   rl   rY   ),r…   rŒ   r‰   Ú_asyncsrK   rf   Úupperr    r8   r/   r0   r3   ÚFunctionÚQueryÚrangeÚSynchronizeMessager^   r†   Ú	ExceptionÚsysÚ
excepthookÚexc_inforZ   r7   rq   r„   ÚkeysÚ
xact_staterE   r‡   ÚidÚ	__class__ÚbytesrU   Úput_copydataÚput_tupledataÚCopyFromBeginÚCopyFailMessageÚCopyFailSequenceÚCopyDoneMessageÚCopyDoneSequencer5   Úsent_from_stdinÚCopyToBegin)r   r.   ÚSWITCH_TYPESÚ
ERROR_TYPEÚ
READY_TYPEÚERROR_PARSEÚlenÚCOMMANDSÚ	NCOMMANDSÚHOOKÚoffsetÚcurrent_steprŽ   ÚpathsrR   rb   r   ÚpathÚ	next_stepÚemr    ÚmsgÚerrÚrr‰   s                            r   Ústandard_putzInstruction.standard_putÅ  sØ  € ð Œ]€(Øˆc�(‰mŒm€)Ø	Œ€$ð �”˜1”ÐÐØœ) Aœ,Ñ€6ˆ<ˆ<ð œ) Aœ,Ñ€6ˆ<à€4„<Ø�Ô€#Ø
ˆsŒxŒ.€%Ø€)Ø
€%àð _ñ _€aØˆA�:€5ð ˜<Ô(×,Ò,¨Q¨q¬T°<Ñ@Ô@�?€4ˆà
�làˆ„tˆzÒÐØ
ˆ+�a˜”dÑ
Ô
€Rà˜Tœ(Ÿ.š.Ñ*Ô*¨hÒ6Ð6€T„Z�%Ø€TÔØ�ˆˆå€d„jØ€l€l€lð 	ŒÝÔÔ�Wœ]Ô/ðð 	ð 	õ ˜& )Ñ,Ô,ð ð ˆ&Ø
�6Ô
�gÔ8Ð
8Ð
8Øˆð 9õ
 €t„zØ€|€|€|ð �FÔ€SØ�#”(Œ^€Uà€\ÙØ	
ˆ1Œ•Ð	 Ð	 Ø	�”ÐÐÝ˜A˜aœDÔ! ! A¤$Ñ'Ô'€cð'Ø‡~‚~�cÑÔÐÐøÝð 'ð 'ð 'õ „~•s”|‘~”~Ð&Ð&Ð&Ð&Ð&Ð&Ð&øøøøð'øøøð
 „l×Ò˜!ÑÔÐùð €T„ZÝ!Ô-ØØØÕ Ý˜˜lÔ+×0Ò0Ñ2Ô2Ñ3Ô3Ø�A”$ðñ ô ð 	ð/ñ ô €TÔõ €T„ZØ€\€\€\ð 	ˆˆQˆqŒT‰
Œ
€AØ×Ò�QÑÔÐàÐØ€\�\à€\Ø	Œ�*ÒÐØœ€d„oð €UØˆ=ð ��k€fð 
�9Ò	Ð	àØ�VÔ€cØ�3”8Œn€eð ˆ=ñ ð ð 
Œð 4˜4œ>¨"Ô-¨aÔ0µB°x±L´LÒ@Ð@Ø„>×Ò�"˜X™,œ,¨	Ð2Ñ3Ô3Ð3ð ˜œ 1œ¨°Ð'=Ð?€$„)àˆyÒÐå€4„:€:Ø
„x�<ÐÐ IÐð �BŒ-€4Ø
„n�ÐÐå˜TÔ.Ð/€D„J€JØŒ�%ÐÐå˜TÔ/Ð0€D„J€JØŒ	•WÔ*Ô/Ò/Ð/ð "Ô1Ð3Ø	„]�6˜!‘8�9�9Ôñ€DÔå$Ô4Ð6Ø	„]�6˜!‘8�9�9Ôñ€DÔå˜4Ô/Ð0€D„J€JØŒ	•WÔ(Ô-Ò-Ð-å˜TÔ.Ð/€D„JØ	€,s   Æ.GÇ
G7ÇG2Ç2G7c                 óL  ‡— t           j        j        Š|d         d         ‰k    r(t          | j        f| _        |                      |¦  «        S ˆfd„|D ¦   «         }t          |¦  «        t          |¦  «        k    r(t          | j        f| _        |                      |¦  «        S | j        r$| j        d         d         t          |¦  «        k    r)| j         	                    t          |¦  «        |f¦  «         || j
        d         | j
        d         f| _
        t          |¦  «        S )a  
		In the context of a copy, `put_copydata` is used as a fast path for
		storing `element.CopyData` messages. When a non-`element.CopyData.type`
		message is received, it reverts the ``state`` attribute back to
		`standard_put` to process the message-sequence.
		rY   r   c                 ó8   •— g | ]}|d          ‰k    ¯|d         ‘ŒS ©r   r   r   )Ú.0r   Úcopydatas     €r   ú
<listcomp>z,Instruction.put_copydata.<locals>.<listcomp>u  s+   ø€ Ð
6Ð
6Ð
6�A Q q¤T¨XÒ%5Ð%5ˆ1ˆQŒ4Ð%5Ð%5Ð%5r   r   )r3   ÚCopyDatarK   rU   rÊ   r0   r½   r‡   r­   rZ   r‰   )r   r.   ÚlinesrÏ   s      @r   r°   zInstruction.put_copydatah  s  ø€ õ ÔÔ"€(àˆb„\�!„_˜Ò Ð Ý˜DÔ-Ð.€4„:Ø
×
Ò
˜HÑ
%Ô
%Ð%à
6Ð
6Ð
6Ð
6˜Ð
6Ñ
6Ô
6€%Ýˆ�Z„Z•3�x‘=”=Ò Ð Ý˜DÔ-Ð.€4„:Ø
×
Ò
˜HÑ
%Ô
%Ð%à	Œð 0˜4œ>¨"Ô-¨aÔ0µB°x±L´LÒ@Ð@Ø„>×Ò�"˜X™,œ,¨Ð.Ñ/Ô/Ð/Ø˜œ 1œ t¤y°¤|Ð5€$„)Ý	ˆX‰ŒÐr   c                 ór  —  ||¦  «        }|s(t           | j        f| _        |                      |¦  «        S | j        r$| j        d         d         t	          |¦  «        k    r)| j                             t	          |¦  «        |f¦  «         || j        d         | j        d         f| _        t          |¦  «        S )NrY   r   r   )rU   rÊ   r0   r‡   r­   rZ   r‰   r½   )r   r.   ÚconsumeÚtuplemessagess       r   r±   zInstruction.put_tupledata€  s­   € ð �7˜8Ñ$Ô$€=Ø
ð 'å˜TÔ.Ð/€D„JØ×Ò˜XÑ&Ô&Ð&à
Œ.ð ;˜DœN¨2Ô.¨qÔ1µR¸±\´\ÒAÐAØ„N×Ò�B˜x™LœL¨-Ð8Ñ:Ô:Ð:Ø˜$œ) Aœ,¨¬	°!¬Ð6€4„9Ý
ˆmÑ
Ô
Ðr   c                 ó*  ‡‡— |d         d         ‰ur(t           | j        f| _        |                      |¦  «        S ˆˆfd„|D ¦   «         }t          |¦  «        t          |¦  «        k    r(t           | j        f| _        |                      |¦  «        S | j        r$| j        d         d         t          |¦  «        k    r)| j                             t          |¦  «        |f¦  «         || j        d         | j        d         f| _        t          |¦  «        S )zX
			Fast path used when inside an Execute command. As soon as tuple
			data is seen.
			rY   r   c                 óJ   •— g | ]}|d          ‰k    ¯ ‰|d         ¦  «        ‘Œ S rÍ   r   )rÎ   r   ÚpÚts     €€r   rÐ   z-Instruction.put_tupledata.<locals>.<listcomp>ž  s.   ø€ Ð;Ð;Ð; °°1´¸²°�A�A�a˜”d‘G”G°°°r   r   )rU   rÊ   r0   r½   r‡   r­   rZ   r‰   )r   r.   rØ   rÙ   rÕ   s     `` r   r±   zInstruction.put_tupledata�  s  øø€ ð ˆr„l�1„o˜QÐÐÝ˜TÔ.Ð/€D„JØ×Ò˜XÑ&Ô&Ð&à;Ð;Ð;Ð;Ð; XÐ;Ñ;Ô;€=Ý	ˆ-ÑÔ�C ™MœMÒ)Ð)Ý˜TÔ.Ð/€D„JØ×Ò˜XÑ&Ô&Ð&à
Œ.ð ;˜DœN¨2Ô.¨qÔ1µR¸±\´\ÒAÐAØ„N×Ò�B˜x™LœL¨-Ð8Ñ:Ô:Ð:Ø˜$œ) Aœ,¨¬	°!¬Ð6€4„9Ý
ˆh‰-Œ-Ðr   c                 ó:   — d| _         t          | j        f| _        dS rT   )r.   rU   rÊ   r0   r   s    r   r‹   zInstruction.standard_sent¨  rW   r   c                 óŽ   — | j         | j        u s| j         | j        u rd| _         t          | j        f| _        dS | j        | _         dS )aƒ  
		The state method for sending copy data.

		After each call to `sent_from_stdin`, the `messages` attribute is set
		to a `CopyFailSequence`. This sequence of messages assures that the
		COPY will be properly terminated.

		If new copy data is not provided, or `messages` is *not* set to
		`CopyDoneSequence`, the transaction will instruct the remote end to
		cause the COPY to fail.
		r   N)r.   r¶   r´   rU   rÊ   r0   r   s    r   r·   zInstruction.sent_from_stdin³  sP   € ð 
„]�dÔ+Ð+Ð+Ø„-�4Ô(Ð(Ð(ð €4„=Ý˜DÔ-Ð.€4„:€:€:ð Ô(€4„=€=€=r   );r   r   r   r   r0   r3   ÚCopyFailr³   r¤   rK   ÚTupleDescriptorr]   ÚNullr/   r¸   r²   r}   rÑ   r   ÚCopyDoneÚTupler£   ÚFunctionResultÚParseÚParseCompleteÚBindÚBindCompleteÚDescribeÚAttributeTypesÚNoDataÚCloseÚCloseCompleteÚExecuteÚ
SuspensionÚSynchronizeÚFlushrŒ   rˆ   r6   r–   rP   r   r   r˜   r™   Úcomposerš   rž   rŸ   r\   r½   rÊ   r°   r   r±   Ú	NameErrorr‹   r1   r·   r   r   r   r€   r€     sD  € € € € € ðð ð& 
€Ø#�7Ô#Ð$:Ñ;Ô;€ð 
„-Ôð ÔÔ  GÔ$;Ô$AÀ1Ð#EØ„LÔ˜œÔ+¨QÐ/ØÔÔ˜WÔ-Ô3°QÐ7ØÔÔ Ô 3Ô 9¸1Ð=ØÔÔ 'Ô"7Ô"=¸qÐ!AØ„MÔ˜'œ-Ô-¨tÐ4ðð ÔÔ˜WÔ-Ô3°QÐ7ðð ÔÔ˜Z¨˜OØÔÔ˜WÔ-Ô3°QÐ7ðð „MÔ˜'œ-Ô-¨qÐ1ØÔÔ˜WÔ-Ô3°QÐ7Ø„MÔ˜'œ-Ô-¨tÐ4ðð-ð: 
ÔÔØÔÔ 7Ô#9Ô#?ÀÐ"CÐDØ„MÔ˜'œ-Ô-¨tÐ4Ð5ðð 
„-ÔØÔÔ 'Ô"7Ô"=¸tÐ!DÐEðð 
„,ÔØÔÔ Ô!5Ô!;¸TÐ BÐCðð 
ÔÔð ÔÔ 7Ô#9Ô#?ÀÐ"CØÔÔ ØÔÔ" Dð$ðð „NÔ˜7œ>Ô/°Ð6ØÔÔ ØÔÔ# Tð$ððð" 
„-ÔØÔÔ 'Ô"7Ô"=¸tÐ!DÐEðð 
„/Ôð „MÔ˜'œ-Ô-¨qÐ1ØÔÔ Ô 3Ô 9¸1Ð=ØÔÔ 'Ô"7Ô"=¸qÐ!AØ„LÔ˜œÔ+¨TÐ2ØÔÔ˜WÔ-Ô3°TÐ:ðð „MÔ˜'œ-Ô-¨qÐ1ØÔÔ˜wÔ1Ô7¸Ð>ØÔÔ˜WÔ-Ô3°TÐ:ðð ÔÔ˜Z¨˜OØÔÔ˜WÔ-Ô3°QÐ7ðð ÔÔ˜WÔ-Ô3°TÐ:ðð+ð4 
ÔÔØ„MÔ˜'œ-Ô-¨tÐ4Ð5ðð 
„-Ô�tð`	€ðD€ð +5ð ð ð ð ð> 8Ô>ð ð ð ð ð8ð 8ð 8ð
 Ô ØØˆg�t˜XÐ&Ñ'Ô'Øð	
<ð 
<ð 
<ð 
<ð ”Ô%¨¬Ô(:Ñ:ØŒ}Ô!ØŒ}Ô!Ø”Ô#Øðað að að aðFð ð ð.'à#ðð ð ð ð øð 	ð ð ð ð „}ÔØ„}Ôðð ð ð ð ð ðøøøð6.ð .ð .ð 	€ð)ð )ð )ð )ð )s   Ð	P ÐP1Ð0P1r€   )+r   r¨   r”   rL   Úabcr   r   Ú	itertoolsr   Úoperatorr   Úget0rš   Úpython.functoolsr	   rï   Ú r
   r3   Úhashlibr   Úresolved.cryptr   Úport.optimizedr   ÚImportErrorrU   r5   r/   ÚNoticerK   r]   ÚNotifyÚ
ShowOptionr^   r   r–   rq   Úobjectr   r#   r:   r€   r   r   r   ú<module>rÿ      s1  ðð %Ð $Ø 
€
€
€
Ø 	€	€	€	Ø €€€Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø€z�!�}„}€Ø€z�!�}„}€à 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø !Ð !Ð !Ð !Ð !Ð !à Ð Ð Ð Ð Ð Ø "Ð "Ð "Ð "Ð "Ð "ðØ4Ð4Ð4Ð4Ð4Ð4Ð4øØð ð ð Ø€ðøøøð €	Ø
€Ø€ð 	„Ô�w”~Ô+Ø„Ô�w”~Ô+ØÔÔ˜7Ô-Ô3ð€ð
ð 
ð 
ð#Ü#)ð ðð ð ð ð �& gð ñ ô ð ð$ð $ð $ð $ð $ˆkñ $ô $ð $ð8v.ð v.ð v.ð v.ð v.�+ñ v.ô v.ð v.ðp@)ð @)ð @)ð @)ð @)�+ñ @)ô @)ð @)ð @)ð @)s   ÁA ÁA!Á A!