
    giu                        d Z ddlmZ ddlZddlmZ ddlmZmZ ddl	m
Z ddlmZ dd	lmZ erdd
lmZ  ej        d          Z G d d          Z G d de          ZdS )z)
Psycopg Pipeline object implementation.
    )annotationsN)TracebackType)TYPE_CHECKINGAny   )errors)Self)BasePipeline)
Connectionpsycopgc                      e Zd ZddZdd
ZdS )
_DummyLockreturnNonec                    d S N selfs    a/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/psycopg/_pipeline.py	__enter__z_DummyLock.__enter__   s        exc_typetype[BaseException] | Noneexc_valBaseException | Noneexc_tbTracebackType | Nonec                    d S r   r   )r   r   r   r   s       r   __exit__z_DummyLock.__exit__   s	     	r   Nr   r   r   r   r   r   r   r   r   r   )__name__
__module____qualname__r   r    r   r   r   r   r      s<                r   r   c                  N     e Zd ZU dZdZded<   dd fdZddZddZddZ xZ	S )Pipelinez/Handler for (sync) connection in pipeline mode.r   Connection[Any]_connFconn_no_lockboolr   r   c                    t                                          |           |rt                      n|j        | _        d S r   )super__init__r   lock_lock)r   r*   r+   	__class__s      r   r/   zPipeline.__init__.   s5    %-<Z\\\49


r   c                    	 | j         5  | j                            |                                            ddd           dS # 1 swxY w Y   dS # t          j        $ r}|                    d          d}~ww xY w)zkSync 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   synczPipeline.sync2   s    	* 2 2
 0 01112 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 	* 	* 	*##D)))	*s9   A -AA AA 
AA A9A44A9r	   c                    | j         5  | j                            |                                            d d d            n# 1 swxY w Y   | S r   )r1   r)   r4   
_enter_genr   s    r   r   zPipeline.__enter__<   s    Z 	/ 	/JOODOO--...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/s   -AAAr   r   r   r   r   r   c                   	 | j         5  | j                            |                                            d d d            n# 1 swxY w Y   nK# t          $ r>}|rt
                              d| |           n|                    d           Y d }~nd }~ww xY w|                     |           d S # |                     |           w xY w)Nz error ignored terminating %r: %s)	r1   r)   r4   	_exit_gen	Exceptionloggerwarningr8   _exit)r   r   r   r   exc2s        r   r    zPipeline.__exit__A   s   
	  2 2
 0 01112 2 2 2 2 2 2 2 2 2 2 2 2 2 2 	0 	0 	0 0A4NNNN))$/// ONNNN	0 JJwDJJwsQ   A -AA AA 	A
A B0 
B4BB0 BB0 0C)F)r*   r(   r+   r,   r   r   r!   )r   r	   r"   )
r#   r$   r%   __doc____annotations__r/   r:   r   r    __classcell__)r2   s   @r   r'   r'   (   s         99J= = = = = = =* * * *   
               r   r'   )rD   
__future__r   loggingtypesr   typingr   r    r   r6   _compatr	   _pipeline_baser
   
connectionr   	getLoggerr@   r   r'   r   r   r   <module>rP      s    # " " " " "        % % % % % % % %             ( ( ( ( ( ( '&&&&&&		9	%	%       )  )  )  )  ) | )  )  )  )  ) r   