
    ,hu                        S r SSKJr  SSKrSSKJr  SSKJrJr  SSK	J
r  SSKJr  SS	KJr  \(       a  SS
KJr  \R$                  " S5      r " S S5      r " S S\5      rg)z)
Psycopg Pipeline object implementation.
    )annotationsN)TracebackType)TYPE_CHECKINGAny   )errors)Self)BasePipeline)
Connectionpsycopgc                  8    \ rS rSrSS jr        SS jrSrg)
_DummyLock   c                    g N selfs    L/var/www/html/Ai_home/venv/lib/python3.13/site-packages/psycopg/_pipeline.py	__enter___DummyLock.__enter__   s        c                    g r   r   )r   exc_typeexc_valexc_tbs       r   __exit___DummyLock.__exit__   s     	r   r   NreturnNoner   ztype[BaseException] | Noner   zBaseException | Noner   zTracebackType | Noner    r!   )__name__
__module____qualname____firstlineno__r   r   __static_attributes__r   r   r   r   r      s2    , & %	
 
r   r   c                  r   ^  \ rS rSr% SrSrS\S'   SSU 4S jjjrSS jrSS jr        SS	 jr	S
r
U =r$ )Pipeline(   z/Handler for (sync) connection in pipeline mode.r   Connection[Any]_connc                t   > [         TU ]  U5        U(       a  [        5       U l        g UR                  U l        g r   )super__init__r   lock_lock)r   conn_no_lock	__class__s      r   r/   Pipeline.__init__.   s%    %-Z\
499
r   c                     U R                      U R                  R                  U R                  5       5        SSS5        g! , (       d  f       g= f! [        R
                   a  nUR                  S5      eSnAff = f)z[Sync the pipeline, send any pending command and receive and process
all available results.
N)r1   r,   wait	_sync_gene_NO_TRACEBACKwith_traceback)r   exs     r   syncPipeline.sync2   sS    	*

 01  	*##D))	*s3   A *AA 
AA A A<&A77A<c                    U R                      U R                  R                  U R                  5       5        S S S 5        U $ ! , (       d  f       U $ = fr   )r1   r,   r7   
_enter_genr   s    r   r   Pipeline.__enter__<   s7    ZZJJOODOO-.  Zs   *A
Ac                |    U R                      U R                  R                  U R                  5       5        S S S 5        U R                  U5        g ! , (       d  f       N = f! [         a8  nU(       a  [
        R                  SX5         S nANOUR                  S 5      eS nAff = f! U R                  U5        f = f)Nz error ignored terminating %r: %s)	r1   r,   r7   	_exit_gen	Exceptionloggerwarningr;   _exit)r   r   r   r   exc2s        r   r   Pipeline.__exit__A   s    
	 

 01  JJw  	0A4NN))$//	0 JJwsQ   A# *AA# 
A A# B(  A# #
B%-B 
B( B  B%%B( (B;)r1   )F)r2   r+   r3   boolr    r!   r   )r    r	   r"   )r#   r$   r%   r&   __doc____annotations__r/   r=   r   r   r'   __classcell__)r4   s   @r   r)   r)   (   sU    9J= =*
 ,  &  %	 
 
   r   r)   )rK   
__future__r   loggingtypesr   typingr   r    r   r9   _compatr	   _pipeline_baser
   
connectionr   	getLoggerrE   r   r)   r   r   r   <module>rW      sM    #   %   (&			9	% ) | ) r   