U ÙAT^ c@s dd„ZdS)c cs| ¡}dVd}| |¡}| ¡D]²\}}}|dkr>dVn*|dkrNdVn| d¡r\q$n d |¡V| d d ¡}| d  |¡¡}d d „| ¡Dƒ} d |d dd„| Dƒ¡¡}| |¡} | D]} d | d¡VqÀq$d}| |¡}| ¡D]\} }}d |¡VqîdVdS)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(). zBEGIN TRANSACTION;zª SELECT "name", "type", "sql" FROM "sqlite_master" WHERE "sql" NOT NULL AND "type" == 'table' ORDER BY "name" Zsqlite_sequencezDELETE FROM "sqlite_sequence";Z sqlite_stat1zANALYZE "sqlite_master";Zsqlite_z{0};ú"ú""zPRAGMA table_info("{0}")cSsg|]}t|dƒ‘qS)i)Zstr)Ú.0Z table_info©rú$/usr/lib64/python3.8/sqlite3/dump.pyZ 3sz_iterdump..z2SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";z,css |]}d | dd¡¡VqdS)z'||quote("{0}")||'rrN)ÚformatÚreplace)rZcolrrrZ 6sz_iterdump..iz£ SELECT "name", "type", "sql" FROM "sqlite_master" WHERE "sql" NOT NULL AND "type" IN ('index', 'trigger', 'view') zCOMMIT;N)ZcursorZexecuteZfetchallZ startswithrrZjoin) Z connectionZcuZqZ schema_resZ table_nameZtypeZsqlZtable_name_identZresZ column_namesZ query_resZrowZnamerrrÚ _iterdump s6     þ  rN)rrrrrZ s