| Server IP : 43.141.49.92 / Your IP : 113.219.202.141 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.11/sqlite3/__pycache__/ |
Upload File : |
�
��e�
� � � d � Z dS )c # � K � d}| � � � }dV � d}|� |� � }g }|� � � D �]�\ }}}|dk r:|� d� � � � � } dg}|d� | D � � z
}�G|dk rd 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 �%/usr/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 r r z_iterdump.<locals>.<listcomp>= s$ � �L�L�L�z��J�q�M�*�*�L�L�Lr
z2SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";�,c 3 �h K � | ]-}d � |� dd� � � � V � �.dS )z'||quote("{0}")||'r r N)�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
r z�
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�
startswithr r �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/ r r
r �<module>r0 s# ��N� N� N� N� Nr