
    d                         d  Z dS )c              #     K   |                                  }dV  d}|                    |          }g }|                                D ]E\  }}}|dk    r:|                    d                                          }dg}|d |D             z  }G|dk    rdV  n-|                    d	          rhd
                    |          V  |                    dd          }	|                    d                    |	                    }
d |
                                D             }d                    |	d                    d |D                                 }|                    |          }|D ]}d
                    |d                   V   Gd}|                    |          }|                                D ]\  }}}d
                    |          V  |D ]}d
                    |          V  dV  dS )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().
    zBEGIN 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";zDELETE FROM "sqlite_sequence"c                 8    g | ]}d |d          d|d          dS )z&INSERT INTO "sqlite_sequence" VALUES('    z',   ) ).0rows       /croot/python-split_1694437901252/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/sqlite3/dump.py
<listcomp>z_iterdump.<locals>.<listcomp>$   sD           O#a&NNSVNNN         sqlite_stat1zANALYZE "sqlite_master";sqlite_z{0};"""zPRAGMA table_info("{0}")c                 8    g | ]}t          |d                    S )r   )str)r	   
table_infos     r   r   z_iterdump.<locals>.<listcomp>:   s$    LLLzJqM**LLLr   z2SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";,c              3   h   K   | ]-}d                      |                    dd                    V  .dS )z'||quote("{0}")||'r   r   N)formatreplace)r	   cols     r   	<genexpr>z_iterdump.<locals>.<genexpr>=   s@      eeQT-44S[[d5K5K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')
        zCOMMIT;N)cursorexecutefetchall
startswithr   r   join)
connectioncuq
schema_resr   
table_nametypesqlrowstable_name_identrescolumn_names	query_resr
   names                  r   	_iterdumpr-   
   sq      
				B
	A AJO!+!4!4!6!6  )  )
D#***::@AAJJLLD>?O          O >)),----""9-- 
	& --$$%%% &--c488jj3::;KLLMMLLS\\^^LLLDKKHHeeXdeeeeeg g JJqMM	 	) 	)C--A''((((	)	A AJ%..00 " "dCmmC  !!!!  " "mmC  !!!!
r   N)r-   r   r   r   <module>r.      s#   H H H H Hr   