/* * Quick and dirty test for SQLite3 encryption codec. * (C) 2010 Olivier de Gaalon * * Distributed under the terms of the Botan license */ #include #include namespace SQL { const char * CREATE_TABLE_TEST = "create table 'test' (id INTEGER PRIMARY KEY, name TEXT, creationtime TEXT);"; const char * CREATE_TABLE_TEST2 = "create table 'test2' (id INTEGER PRIMARY KEY, name TEXT, creationtime TEXT);"; const char * INSERT_INTO_TEST = "INSERT INTO test (name, creationtime) VALUES ('widget', '1st time');\ INSERT INTO test (name, creationtime) VALUES ('widget', '2nd time');\ INSERT INTO test (name, creationtime) VALUES ('widget', '3rd time');\ INSERT INTO test (name, creationtime) VALUES ('widget', '4th time');\ INSERT INTO test (name, creationtime) VALUES ('widget', '5th time');"; const char * INSERT_INTO_TEST2 = "INSERT INTO test2 (name, creationtime) VALUES ('widget2', '1st time2');\ INSERT INTO test2 (name, creationtime) VALUES ('widget2', '2nd time2');\ INSERT INTO test2 (name, creationtime) VALUES ('widget2', '3rd time2');\ INSERT INTO test2 (name, creationtime) VALUES ('widget2', '4th time2');\ INSERT INTO test2 (name, creationtime) VALUES ('widget2', '5th time2');"; const char * SELECT_FROM_TEST = "SELECT * FROM test;"; const char * SELECT_FROM_TEST2 = "SELECT * FROM test2;"; }; static int callback(void *NotUsed, int argc, char **argv, char **azColName){ int i; fprintf(stderr, "\t"); for(i=0; i