관리-도구
편집 파일: dump.cpython-39.opt-2.pyc
a R�f � @ s d d� Z dS )c c s | � � }dV d}|�|�}|�� D ]�\}}}|dkr>dV n*|dkrNdV n|�d�r\q$nd�|�V |�d d �}|�d�|��}dd � |�� D �} d�|d�dd� | D ���}|�|�} | D ]}d�|d �V q�q$d}|�|�}|�� D ]\}}}d�|�V q�dV d S )NzBEGIN TRANSACTION;z� SELECT "name", "type", "sql" FROM "sqlite_master" WHERE "sql" NOT NULL AND "type" == 'table' ORDER BY "name" Zsqlite_sequencezDELETE FROM "sqlite_sequence";Zsqlite_stat1zANALYZE "sqlite_master";Zsqlite_z{0};�"�""zPRAGMA table_info("{0}")c S s g | ]}t |d ��qS )� )�str)�.0Z table_info� r �1/opt/alt/python39/lib64/python3.9/sqlite3/dump.py� <listcomp>3 � z_iterdump.<locals>.<listcomp>z2SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";�,c s s | ]}d � |�dd��V qdS )z'||quote("{0}")||'r r N)�format�replace)r �colr r r � <genexpr>6 r z_iterdump.<locals>.<genexpr>� z� SELECT "name", "type", "sql" FROM "sqlite_master" WHERE "sql" NOT NULL AND "type" IN ('index', 'trigger', 'view') zCOMMIT;)ZcursorZexecuteZfetchall� startswithr r �join) Z connectionZcu�qZ schema_resZ table_name�typeZsqlZtable_name_ident�resZcolumn_namesZ query_res�row�namer r r � _iterdump s6 � r N)r r r r r �<module> r