ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/sqlite3/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/sqlite3/__pycache__/dump.cpython-311.pyc

�

�f�
���d�ZdS)c#�K�d}|���}dV�d}|�|��}g}|���D�]�\}}}|dkr:|�d�����}	dg}|d�|	D��z
}�G|dkrd	V�n�|�d
��r�h|�d��rI|sd}d
V�d�|�dd��|�dd����V�nd�|��V�|�dd��}
|�d�|
����}d�|���D��}d�|
d�d�|D������}|�|��}
|
D]}d�|d��V�� ���d}|�|��}|���D]\}}}d�|��V��|rdV�|D]}d�|��V��dV�dS)a/
    Returns an iterator to the dump of the database in an SQL text format.

    Used to produce an SQL dump of the database.  Useful to save an in-memory
    database for later restoration.  This function should not be called
    directly but instead called from the Connection method, iterdump().
    FzBEGIN TRANSACTION;z�
        SELECT "name", "type", "sql"
        FROM "sqlite_master"
            WHERE "sql" NOT NULL AND
            "type" == 'table'
            ORDER BY "name"
        �sqlite_sequencez SELECT * FROM "sqlite_sequence";zDELETE FROM "sqlite_sequence"c�8�g|]}d|d�d|d�d���S)z&INSERT INTO "sqlite_sequence" VALUES('�z',��)�)�.0�rows  �3/opt/alt/python311/lib64/python3.11/sqlite3/dump.py�
<listcomp>z_iterdump.<locals>.<listcomp>%sD�� � � ��O�#�a�&�N�N�S��V�N�N�N� � � ��sqlite_stat1zANALYZE "sqlite_master";�sqlite_zCREATE VIRTUAL TABLETzPRAGMA writable_schema=ON;z^INSERT INTO sqlite_master(type,name,tbl_name,rootpage,sql)VALUES('table','{0}','{0}',0,'{1}');�'z''z{0};�"�""zPRAGMA table_info("{0}")c�8�g|]}t|d����S)r)�str)r	�
table_infos  rrz_iterdump.<locals>.<listcomp>=s$��L�L�L�z��J�q�M�*�*�L�L�Lr
z2SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";�,c3�hK�|]-}d�|�dd����V��.dS)z'||quote("{0}")||'rrN)�format�replace)r	�cols  r�	<genexpr>z_iterdump.<locals>.<genexpr>@s@����e�e�QT�-�4�4�S�[�[��d�5K�5K�L�L�e�e�e�e�e�er
rz�
        SELECT "name", "type", "sql"
        FROM "sqlite_master"
            WHERE "sql" NOT NULL AND
            "type" IN ('index', 'trigger', 'view')
        zPRAGMA writable_schema=OFF;zCOMMIT;N)�cursor�execute�fetchall�
startswithrr�join)�
connection�writeable_schema�cu�q�
schema_resr�
table_name�type�sql�rows�table_name_ident�res�column_names�	query_resr
�names                r�	_iterdumpr/
s������	�	�	�	�	�B�
����	�A����A���J��O�!+�!4�!4�!6�!6�")�")��
�D�#��*�*�*��:�:�@�A�A�J�J�L�L�D�>�?�O�� � �� � � �
�O�
�
�>�
)�
)�,�-�-�-�-�
�
"�
"�9�
-�
-�	&��
�^�^�2�
3�
3�
	&�#�
4�#'� �2�3�3�3�9�9?�� �(�(��d�3�3��k�k�#�t�,�,�:�:�
�
�
�
��-�-��$�$�%�%�%�&�-�-�c�4�8�8���j�j�3�:�:�;K�L�L�M�M��L�L�S�\�\�^�^�L�L�L��D�K�K���H�H�e�e�Xd�e�e�e�e�e�
g�
g���J�J�q�M�M�	��	)�	)�C��-�-��A��'�'�(�(�(�(�	)�	�A����A���J�%�.�.�0�0�"�"���d�C��m�m�C� � �!�!�!�!��-�+�,�,�,��"�"���m�m�C� � �!�!�!�!�
�����r
N)r/rr
r�<module>r0s#��N�N�N�N�Nr

Zerion Mini Shell 1.0