From cd02c0a761ced60ea284dafae45aa54c9733c79f Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 24 Nov 2012 16:41:11 +0100 Subject: [PATCH] Added command line parameter "drop_tables". --- .anjuta_sym_db.db | Bin 34816 -> 34816 bytes src/main.c | 15 +++++++++++++++ tests/db.db | Bin 3072 -> 3072 bytes 3 files changed, 15 insertions(+) diff --git a/.anjuta_sym_db.db b/.anjuta_sym_db.db index f0289ebf34429fbdfaa5cfa23e80b9de18036d45..9e4533ac7b6cb986cc78ff1a4f81ff08826a8bfe 100644 GIT binary patch delta 638 zcmZ8f&ubGw7~O9slOJ}QWHhnrHVH|vkY?j<8Z08F znzq-3xs?13MFIZ_|N9IvR$P~@-G%b@bl;@suG z)%&3F#ZnoT`18{3V7Y5GOvK|m7x`{hS1 z4fFiFc1fn_D1=A2hV$sijb49`R?d>VFhA*?Mu{SzzwYAa!~_DH8Kz!uu%_uq`_uR* zK9=xXNs?r-PuCPl3RTNkV{<&WPDI>wSbL#_&7y)8PX zud$BdbS#^dr>4n8f%`h`j7(-kw{nuG8u2OLOEFAIR#489W_7*MG?_ggI`yvsYjx}f zbF#$0;;L!rHLKOq&1xoao)m=WA7rz-fYYwGK<>yC4kh#rIrsw{y3wcaAfF57BdOG6 zNdG@Cb$@Lnf|%kx9_nQg-g9Z-B_;tJ2Fk~;mN7+r9_pupsE>c(uj9=M;-l@P_+z8( GI{X1n0kZr6 delta 550 zcmYjMO=}ZT6n*!-ynMHL)x=uI)TTifNo_NkU_o72grd-mv?AytPBO0&NRv2|7K4aU zOG|bW?yf&V8AiGhvvuLdjcx>?TNhfo7UI)T$X#4G=iGBSr|Z(LOI;1T{>9tid5`ZW zK=_A=)i^6$H~gW-lT4693>D`4uOB7p57HuILxZH#UrA+Yj7UOnl6qbU644++2!zw= z2tas8+LfjwHT+W0VSrSB06Bc9ufrm~)vv%3epS1NfAqVc<7)95tl^8|jbLe~S+gjL z{qy*(s43~Bn4@z;boY~3H16PgV+PU4(DV?!=PCSb%)$cxG%iF1Jqob{R%KaVlm@i# zrdB4orjncn5odWeLcx}%Ro<-0y5*3;1pCcS2>YO_#ZT+ScuKh%=9bLi{Br(fFEM6p zo0YnBK%W%+lDeukTb;6Hw#~KpG{35d?Uq8ayd~SF({9?b6r12PiXZv(Xq-}w?@%%Vt z%S}b6{oyjd6%}wy=n-|;Ctp1K2z~dmf80q1nP47name); + if (drop_tables) + { + gchar *sql; + + sql = g_strdup_printf ("DROP TABLE %s", + table->name); + gda_connection_execute_non_select_command (gda_conn_db, + sql, + NULL); + + g_free (sql); + } + /* sql builder for insert into */ table->sqlbuilder = gda_sql_builder_new (GDA_SQL_STATEMENT_INSERT); gda_sql_builder_set_table (table->sqlbuilder, table->name); diff --git a/tests/db.db b/tests/db.db index dc43486743d21deaecf2191ff3d504622f8fb506..e286b13d38fc56ab533e1e8b093a2b4e92e55167 100644 GIT binary patch literal 3072 zcmWFz^vNtqRY=P(%1ta$FlJz3U}R))P*7lCV0Z__%s>nSH-HQl7zao*BC&BX-!bSu zlHvu*GBJH%V6FxdqhK@y1~3E~IoR06<>eV0<4Y2ga#E8^i%arzQ;Uk>3})vbSH}=n zg%C$4A6Esqu!2Trih`$Kh^xD6kd8ueX;EHcZmL3JMMU{q@W(K;3M!JTE;*4yZ!a%v8)D*A$ jj66e2Q&U|76I~-CQ2vM3>P$n`2#4S~@RATI;}`~7W4 delta 80 zcmZpWXpop7EqITCfq@x{nSk`Ui8{tWLET4cyg(iU3j+hw2c{331zDPym>2~n7IrbV WZWiQt&pfeVCMzRQ0TYB5zzP7HSQ0M) -- 2.49.0