Lines Matching full:db

49     sqlite::database db = sqlite::database::in_memory();  in ATF_TEST_CASE_BODY()  local
50 create_test_table(raw(db)); in ATF_TEST_CASE_BODY()
51 verify_test_table(raw(db)); in ATF_TEST_CASE_BODY()
61 ::sqlite3* db; in ATF_TEST_CASE_BODY()
62 ATF_REQUIRE_EQ(SQLITE_OK, ::sqlite3_open_v2("test.db", &db, in ATF_TEST_CASE_BODY()
64 create_test_table(db); in ATF_TEST_CASE_BODY()
65 ::sqlite3_close(db); in ATF_TEST_CASE_BODY()
68 sqlite::database db = sqlite::database::open(fs::path("test.db"), in ATF_TEST_CASE_BODY() local
70 verify_test_table(raw(db)); in ATF_TEST_CASE_BODY()
79 sqlite::database::open(fs::path("missing.db"), sqlite::open_readonly)); in ATF_TEST_CASE_BODY()
80 ATF_REQUIRE(!fs::exists(fs::path("missing.db"))); in ATF_TEST_CASE_BODY()
88 sqlite::database db = sqlite::database::open(fs::path("test.db"), in ATF_TEST_CASE_BODY() local
90 ATF_REQUIRE(fs::exists(fs::path("test.db"))); in ATF_TEST_CASE_BODY()
91 create_test_table(raw(db)); in ATF_TEST_CASE_BODY()
94 ::sqlite3* db; in ATF_TEST_CASE_BODY()
95 ATF_REQUIRE_EQ(SQLITE_OK, ::sqlite3_open_v2("test.db", &db, in ATF_TEST_CASE_BODY()
97 verify_test_table(db); in ATF_TEST_CASE_BODY()
98 ::sqlite3_close(db); in ATF_TEST_CASE_BODY()
112 sqlite::database::open(fs::path("protected/test.db"), in ATF_TEST_CASE_BODY()
125 sqlite::database db = sqlite::database::temporary(); in ATF_TEST_CASE_BODY() local
126 create_test_table(raw(db)); in ATF_TEST_CASE_BODY()
127 verify_test_table(raw(db)); in ATF_TEST_CASE_BODY()
134 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
135 db.close(); in ATF_TEST_CASE_BODY()
160 const sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
161 ATF_REQUIRE(!db.db_filename()); in ATF_TEST_CASE_BODY()
168 const sqlite::database db = sqlite::database::open(fs::path("test.db"), in ATF_TEST_CASE_BODY() local
170 ATF_REQUIRE(db.db_filename()); in ATF_TEST_CASE_BODY()
171 ATF_REQUIRE_EQ(fs::path("test.db"), db.db_filename().get()); in ATF_TEST_CASE_BODY()
178 const sqlite::database db = sqlite::database::temporary(); in ATF_TEST_CASE_BODY() local
179 ATF_REQUIRE(!db.db_filename()); in ATF_TEST_CASE_BODY()
186 sqlite::database db = sqlite::database::open(fs::path("test.db"), in ATF_TEST_CASE_BODY() local
188 const optional< fs::path > db_filename = db.db_filename(); in ATF_TEST_CASE_BODY()
190 db.close(); in ATF_TEST_CASE_BODY()
191 ATF_REQUIRE_EQ(db_filename, db.db_filename()); in ATF_TEST_CASE_BODY()
198 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
199 db.exec(create_test_table_sql); in ATF_TEST_CASE_BODY()
200 verify_test_table(raw(db)); in ATF_TEST_CASE_BODY()
207 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
209 db.exec("SELECT * FROM test")); in ATF_TEST_CASE_BODY()
211 db.exec("CREATE TABLE test (col INTEGER PRIMARY KEY);" in ATF_TEST_CASE_BODY()
213 db.exec("SELECT * FROM test"); in ATF_TEST_CASE_BODY()
220 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
221 sqlite::statement stmt = db.create_statement("SELECT 3"); in ATF_TEST_CASE_BODY()
230 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
231 sqlite::transaction stmt = db.begin_transaction(); in ATF_TEST_CASE_BODY()
240 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
242 db.create_statement("SELECT * FROM missing")); in ATF_TEST_CASE_BODY()
249 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
250 db.exec("CREATE TABLE test (a INTEGER PRIMARY KEY, b INTEGER)"); in ATF_TEST_CASE_BODY()
251 db.exec("INSERT INTO test VALUES (723, 5)"); in ATF_TEST_CASE_BODY()
252 ATF_REQUIRE_EQ(723, db.last_insert_rowid()); in ATF_TEST_CASE_BODY()
253 db.exec("INSERT INTO test VALUES (145, 20)"); in ATF_TEST_CASE_BODY()
254 ATF_REQUIRE_EQ(145, db.last_insert_rowid()); in ATF_TEST_CASE_BODY()