ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/psycopg2/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/psycopg2/__pycache__/extensions.cpython-311.pyc

�

�܋f���V�dZddlZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!ddlm"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ddlm0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZH	dZIdZJdZKdZLd	ZMdZN	dZOdZPdZQd	ZRdZSd
ZTeQZU	dZVdZWdZXd	ZY	dZZdZ[dZ\d	Z]dZ^d�Z_Gd�d
��Z`Gd�d��Zadd�Zbejcd��ejcd��fd�ZdddlemfZfmgZg	ef��\ZhZieg��\ZjZkn#el$rYnwxYw[f[gddlmmnZn[neoe2jp����D]F\ZqZreq�sdd���sdd���t��Zqere2eq<�G[q[rdS)a�psycopg extensions to the DBAPI-2.0

This module holds all the extensions to the DBAPI-2.0 provided by psycopg.

- `connection` -- the new-type inheritable connection class
- `cursor` -- the new-type inheritable cursor class
- `lobject` -- the new-type inheritable large object class
- `adapt()` -- exposes the PEP-246_ compatible adapting mechanism used
  by psycopg to adapt Python types to PostgreSQL ones

.. _PEP-246: https://www.python.org/dev/peps/pep-0246/
�N)�BINARYARRAY�BOOLEAN�BOOLEANARRAY�BYTES�
BYTESARRAY�DATE�	DATEARRAY�
DATETIMEARRAY�DECIMAL�DECIMALARRAY�FLOAT�
FLOATARRAY�INTEGER�INTEGERARRAY�INTERVAL�
INTERVALARRAY�LONGINTEGER�LONGINTEGERARRAY�
ROWIDARRAY�STRINGARRAY�TIME�	TIMEARRAY�UNICODE�UNICODEARRAY�AsIs�Binary�Boolean�Float�Int�QuotedString)�PYDATE�
PYDATETIME�PYDATETIMETZ�
PYINTERVAL�PYTIME�PYDATEARRAY�PYDATETIMEARRAY�PYDATETIMETZARRAY�PYINTERVALARRAY�PYTIMEARRAY�
DateFromPy�
TimeFromPy�TimestampFromPy�IntervalFromPy)�adapt�adapters�	encodings�
connection�cursor�lobject�Xid�
libpq_version�	parse_dsn�quote_ident�string_types�binary_types�new_type�new_array_type�
register_type�	ISQLQuote�Notify�Diagnostics�Column�ConnectionInfo�QueryCanceledError�TransactionRollbackError�set_wait_callback�get_wait_callback�encrypt_password�����c�(�|t|tf<dS)z;Register 'callable' as an ISQLQuote adapter for type 'typ'.N)r0r>)�typ�callables  �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psycopg2/extensions.py�register_adapterrQ_s��!)�H�c�9�
����c�*�eZdZdZd�Zd�Zd�Zd�ZdS)�SQL_INz-Adapt any iterable to an SQL quotable object.c�"�||_d|_dS�N)�_seq�_conn)�self�seqs  rP�__init__zSQL_IN.__init__gs����	���
�
�
rRc��||_dSrV)rX)rY�conns  rP�preparezSQL_IN.prepareks
����
�
�
rRc���d�|jD��}|j�/|D],}t|d��r|�|j���-d�|D��}dd�|��zdzS)Nc�,�g|]}t|����S�)r/��.0�os  rP�
<listcomp>z$SQL_IN.getquoted.<locals>.<listcomp>qs��-�-�-�a��q���-�-�-rRr^c�6�g|]}|�����Sra)�	getquotedrbs  rPrez$SQL_IN.getquoted.<locals>.<listcomp>vs ��.�.�.�1������.�.�.rR�(s, �))rWrX�hasattrr^�join)rY�pobjs�obj�qobjss    rPrgzSQL_IN.getquotedns���.�-�4�9�-�-�-���:�!��
,�
,���3�	�*�*�,��K�K��
�+�+�+��.�.��.�.�.���e�j�j��'�'�'�$�.�.rRc�D�t|�����SrV)�strrg)rYs rP�__str__zSQL_IN.__str__ys���4�>�>�#�#�$�$�$rRN)�__name__�
__module__�__qualname__�__doc__r[r^rgrqrarRrPrTrTesV������7�7�������	/�	/�	/�%�%�%�%�%rRrTc� �eZdZdZd�Zdd�ZdS)�NoneAdapterz�Adapt None to NULL.

    This adapter is not used normally as a fast path in mogrify uses NULL,
    but it makes easier to adapt composite types.
    c��dSrVra)rYrms  rPr[zNoneAdapter.__init__�s���rR�NULLc��|SrVra)rY�_nulls  rPrgzNoneAdapter.getquoted�s���rRN)ry)rrrsrtrur[rgrarRrPrwrw}sA��������

�
�
������rRrwc��|�|sdS|st|��|Sd|vr+d|vrtd���|�d��|d<d�|���D��}|�&t|��}|�|��|}d�d�|���D����}t|��|S)	z4Convert a set of keywords into a connection strings.N��database�dbnamez8you can't specify both 'database' and 'dbname' argumentsc��i|]
\}}|�||��SrVra�rc�k�vs   rP�
<dictcomp>zmake_dsn.<locals>.<dictcomp>�s��
A�
A�
A�v��1�1�=�a��=�=�=rR� c
�t�g|]5\}}d�|tt|��������6S)z{}={})�format�
_param_escaperpr�s   rPrezmake_dsn.<locals>.<listcomp>�sH��&�&�&��Q���N�N�1�m�C��F�F�&;�&;�<�<�&�&�&rR)r7�	TypeError�pop�items�updaterk)�dsn�kwargs�tmps   rP�make_dsnr��s���
�{�6�{��r����#�����
��V����v����J�L�L�
L�!�:�:�j�1�1��x��B�
A������
A�
A�
A�F�
����n�n���
�
�6������

�(�(�&�&��l�l�n�n�&�&�&�'�'�C��c�N�N�N��JrRz([\\'])z\sc�t�|sdS|�d|��}|�|��rd|zdz}|S)z9
    Apply the escaping rule required by PQconnectdb
    z''z\\\1�')�sub�search)�s�	re_escape�re_spaces   rPr�r��sJ��
���t��
�
�g�q�!�!�A����q�����!�G�c�M���HrR)�register_default_json�register_default_jsonb)�Range�_r}�-rV)uru�re�_re�psycopg2._psycopgrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrG�ISOLATION_LEVEL_AUTOCOMMIT� ISOLATION_LEVEL_READ_UNCOMMITTED�ISOLATION_LEVEL_READ_COMMITTED�ISOLATION_LEVEL_REPEATABLE_READ�ISOLATION_LEVEL_SERIALIZABLE�ISOLATION_LEVEL_DEFAULT�STATUS_SETUP�STATUS_READY�STATUS_BEGIN�STATUS_SYNC�STATUS_ASYNC�STATUS_PREPARED�STATUS_IN_TRANSACTION�POLL_OK�	POLL_READ�
POLL_WRITE�
POLL_ERROR�TRANSACTION_STATUS_IDLE�TRANSACTION_STATUS_ACTIVE�TRANSACTION_STATUS_INTRANS�TRANSACTION_STATUS_INERROR�TRANSACTION_STATUS_UNKNOWNrQrTrwr��compiler��psycopg2._jsonr�r��JSON�	JSONARRAY�JSONB�
JSONBARRAY�ImportError�psycopg2._ranger��listr�r�r��replace�upperrarRrP�<module>r�s6����F����7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�
>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>����#$� �!"��"#�� ����(�������������%��5�
��
�	�
�
�
�
�)�����������*�*�*�%�%�%�%�%�%�%�%�0
�
�
�
�
�
�
�
�����F�#�+�j�)�)����U�#�#�

�

�

�

�"I�H�H�H�H�H�H�H�	�+�+�-�-�O�D�)�.�.�0�0��E�:�:���	�	�	��D�	�����1�#�"�"�"�"�"�	�
�D����"�"�#�#���D�A�q�	�	�	�#�r���"�"�3��+�+�1�1�3�3�A��I�a�L�L��q�q�qs�D4�4D<�;D<

Zerion Mini Shell 1.0