+
    Bi#                         ^ RI t ^RIHt ^RIHt ^RIHt  ! R R]] P
                  4      t]R8X  d   ] P                  ! 4        R# R# )    N)memory_database)MemoryDatabaseMixin)requires_virtual_tablec                   `   a  ] tR t^
t o R tR tR tR tR tR t	]
! R4      R 4       tR	tV tR
# )	DumpTestsc                n   . ROpV Uu. uF  q P                   P                  V4      NK  	   pV P                  P                  4       pV Uu. uF  q"NK  	  ppR R.VR,          ORNp\	        \        V4      4       Uu. uF!  pV P                  W,          WC,          4      NK#  	   pR# u upi u upi u upi )PRAGMA foreign_keys=OFF;BEGIN TRANSACTION;:   NNCOMMIT;N)r	   z#CREATE TABLE "index"("index" blob);z"INSERT INTO "index" VALUES(X'01');z3CREATE TABLE "quoted""table"("quoted""field" text);z4INSERT INTO "quoted""table" VALUES('quoted''value');zCREATE TABLE t1(id integer primary key, s1 text, t1_i1 integer not null, i2 integer, unique (s1), constraint t1_idx1 unique (i2), constraint t1_i1_idx1 unique (t1_i1));z'INSERT INTO "t1" VALUES(1,'foo',10,20);z(INSERT INTO "t1" VALUES(2,'foo2',30,30);ztCREATE TABLE t2(id integer, t2_i1 integer, t2_i2 integer, primary key (id),foreign key(t2_i1) references t1(t1_i1));zINSERT INTO "t2" VALUES(1,2,3);zrCREATE TRIGGER trigger_1 update of t1_i1 on t1 begin update t2 set t2_i1 = new.t1_i1 where t2_i1 = old.t1_i1; end;z;CREATE VIEW v1 as select * from t1 left join t2 using (id);)cuexecutecxiterdumprangelenassertEqual)selfexpected_sqlssiactual_sqlss   &    2/usr/lib/python3.14/test/test_sqlite3/test_dump.pytest_table_dumpDumpTests.test_table_dump   s    !D &33]	]3GG"#n!Qq!n& 
 2
 	
 3}-.	0. 
		-*KN	;.	0 	4$	0s   #B(
B-='B2c                (   . ROpRR.p. VOVO F  pV P                   P                  V4       K   	  \        V P                  P	                  RR7      4      pV P                  VR.VORN4       \        V P                  P	                  RR7      4      pV P                  VR.VORN4       \        V P                  P	                  RR7      4      pV P                  V. RO4       \        V P                  P	                  R	R7      4      pV P                  V. RO4       \        V P                  P	                  R
R7      4      pV P                  V. RO4       \        V P                  P	                  RR7      4      pV P                  VR.VOVORN4       R# )-CREATE TABLE "some_table_2" ("id_1" INTEGER);5CREATE VIEW "view_1" AS SELECT * FROM "some_table_2";5CREATE VIEW "view_2" AS SELECT * FROM "test_table_1";z	%_table_%)filterr
   r   zview_%z%_1zsome_%view_2%N)r   %INSERT INTO "some_table_2" VALUES(3);%INSERT INTO "some_table_2" VALUES(4);-CREATE TABLE "test_table_1" ("id_2" INTEGER);%INSERT INTO "test_table_1" VALUES(1);%INSERT INTO "test_table_1" VALUES(2);)r
   r%   r&   r'   r   r   )r
   r   r#   r$   r   )r
   r   r   r   r   listr   r   r   )r   all_table_sqlsall_views_sqlssql	dump_sqlss   &    r   test_table_dump_filter DumpTests.test_table_dump_filter;   s   
 HG

 6^5n5CGGOOC  6 )))=>	!>N>I>	

 ))):;	!>N>I>	

 )))78	
	
 ))):;			
 ))):;		
 )))56	!ONO^OYO	
    c                `   . ROpV P                   P                  RP                  V4      4       V^,          P                  RR4      V^&   VP	                  ^ R4       VP                  . RO4       V P                  P                  4        Uu. uF  q"NK  	  ppV P                  W4       R# u upi )9CREATE TABLE "t1" (id integer primary key autoincrement); NULL1r
   N)r2   zINSERT INTO "t1" VALUES(NULL);z9CREATE TABLE "t2" (id integer primary key autoincrement);)zDELETE FROM "sqlite_sequence";z-INSERT INTO "sqlite_sequence" VALUES('t1',1);r   )	r   executescriptjoinreplaceinsertextendr   r   r   )r   expectedstmtactuals   &   r   test_dump_autoincrement!DumpTests.test_dump_autoincrement   s    

 	bggh/0 qk))&#6/0 
 	 $(77#3#3#56#54$#56* 7s   
B+c           
        V P                   P                  R 4       V P                   P                  R4       V P                   P                  R4       V P                   P                  RR \        ^	4       4       4       V P                   P                  RR \        ^4       4       4       V P                  P                  4        \        4       ;_uu_ 4       pRP                  V P                  P                  4       4      pVP                  V4       VP                  4       pRpV Fk  w  rVV P                  WVR7      ;_uu_ 4        VP                  R	V34      pVP                  4       pV P                  V^ ,          ^ ,          V4       R
R
R
4       Km  	  R
R
R
4       R
#   + '       g   i     K  ; i  + '       g   i     R
# ; i)zBEGIN TRANSACTIONz6CREATE TABLE t1 (id integer primary key autoincrement)z6CREATE TABLE t2 (id integer primary key autoincrement)zINSERT INTO t1 VALUES(?)c              3   &   "   T F  pRx  K	  	  R # 5iNN .0_s   & r   	<genexpr>BDumpTests.test_dump_autoincrement_create_new_db.<locals>.<genexpr>        8S(Q(   zINSERT INTO t2 VALUES(?)c              3   &   "   T F  pRx  K	  	  R # 5irB   rD   rE   s   & r   rH   rI      rJ   rK   r3   )tableseqzc
                        SELECT "seq" FROM "sqlite_sequence" WHERE "name" == ?
                    N))t1	   )t2   )r   r   executemanyr   r   commitr   r7   r   r6   cursorsubTestfetchallr   )	r   cx2querycu2datasetrM   rN   resrowss	   &        r   %test_dump_autoincrement_create_new_db/DumpTests.test_dump_autoincrement_create_new_db   sM   +,PQPQ68S%PQ(8ST68S%PQ(8ST#GGDGG,,./Ee$**,CG &
\\\77++ '#C <<>D$$T!WQZ5 87 &  877 s&   A.F2AFF2F/)	F22G	c                "    ! R  R4      pWP                   n        RpRpRVVR.pV P                  P                  V4       V P                  P                  V4       \	        V P                   P                  4       4      pV P                  WE4       R# )c                   ,   a  ] tR t^t o R tR tRtV tR# )6DumpTests.test_unorderable_row.<locals>.UnorderableRowc                    W n         R # rC   row)r   rU   re   s   &&&r   __init__?DumpTests.test_unorderable_row.<locals>.UnorderableRow.__init__   s    r0   c                (    V P                   V,          # rC   rd   )r   indexs   &&r   __getitem__BDumpTests.test_unorderable_row.<locals>.UnorderableRow.__getitem__   s    xx&r0   rd   N)__name__
__module____qualname____firstlineno__rf   rj   __static_attributes____classdictcell____classdict__s   @r   UnorderableRowrb      s     ' 'r0   rt   zCREATE TABLE "alpha" ("one");zCREATE TABLE "beta" ("two");r
   r   Nr   row_factoryr   r   r)   r   r   )r   rt   CREATE_ALPHACREATE_BETAr;   gots   &     r   test_unorderable_rowDumpTests.test_unorderable_row   s|    	' 	'
 -:8 	 	$%477##%&'r0   c                $   R  pWP                   n        RpRVR.pV P                  P                  V4       \	        V P                   P                  4       4      pV P                  W44       V P                  V P                   P                  V4       R# )c                 v    V P                    Uu. uF  q"^ ,          NK  	  pp\        \        W14      4      # u upi )r   )descriptiondictzip)r   re   colfieldss   &&  r   dict_factory<DumpTests.test_dump_custom_row_factory.<locals>.dict_factory   s3    (*7!ffF7F()) 8s   6zCREATE TABLE test(t);r
   r   Nru   )r   r   CREATE_TABLEr;   r=   s   &    r   test_dump_custom_row_factory&DumpTests.test_dump_custom_row_factory   ss    	* +.(,	B%dgg&&()*,,l;r0   fts4c                    . ROpV P                   P                  R4       \        V P                  P	                  4       4      pV P                  W4       R# )r
   z-CREATE VIRTUAL TABLE test USING fts4(example)N)
r
   zPRAGMA writable_schema=ON;zINSERT INTO sqlite_master(type,name,tbl_name,rootpage,sql)VALUES('table','test','test',0,'CREATE VIRTUAL TABLE test USING fts4(example)');zDCREATE TABLE 'test_content'(docid INTEGER PRIMARY KEY, 'c0example');zBCREATE TABLE 'test_docsize'(docid INTEGER PRIMARY KEY, size BLOB);zCREATE TABLE 'test_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx));zFCREATE TABLE 'test_segments'(blockid INTEGER PRIMARY KEY, block BLOB);z=CREATE TABLE 'test_stat'(id INTEGER PRIMARY KEY, value BLOB);zPRAGMA writable_schema=OFF;r   r(   )r   r;   r=   s   &  r   test_dump_virtual_tables"DumpTests.test_dump_virtual_tables   sA    
 	GHdgg&&()*r0   rD   N)rl   rm   rn   ro   r   r.   r>   r^   rz   r   r   r   rp   rq   rr   s   @r   r   r   
   s?     -0^D
L+(62(*< F#+ $+r0   r   __main__)	unittestutilr   r   r   TestCaser   rl   mainrD   r0   r   <module>r      sC     ! % ([+#X%6%6 [+| zMMO r0   