Lines Matching full:db
46 /// \param db The SQLite database.
54 check_in_table(sqlite::database& db, const char* table_name, in check_in_table() argument
57 sqlite::statement stmt = db.create_statement( in check_in_table()
74 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
75 db.exec("CREATE TABLE t (col INTEGER PRIMARY KEY)"); in ATF_TEST_CASE_BODY()
76 db.exec("INSERT INTO t VALUES (3)"); in ATF_TEST_CASE_BODY()
78 sqlite::transaction tx = db.begin_transaction(); in ATF_TEST_CASE_BODY()
79 db.exec("INSERT INTO t VALUES (5)"); in ATF_TEST_CASE_BODY()
81 ATF_REQUIRE( check_in_table(db, "t", "col", 3)); in ATF_TEST_CASE_BODY()
82 ATF_REQUIRE(!check_in_table(db, "t", "col", 5)); in ATF_TEST_CASE_BODY()
89 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
90 db.exec("CREATE TABLE t (col INTEGER PRIMARY KEY)"); in ATF_TEST_CASE_BODY()
91 db.exec("INSERT INTO t VALUES (3)"); in ATF_TEST_CASE_BODY()
93 sqlite::transaction tx = db.begin_transaction(); in ATF_TEST_CASE_BODY()
94 db.exec("INSERT INTO t VALUES (5)"); in ATF_TEST_CASE_BODY()
97 ATF_REQUIRE(check_in_table(db, "t", "col", 3)); in ATF_TEST_CASE_BODY()
98 ATF_REQUIRE(check_in_table(db, "t", "col", 5)); in ATF_TEST_CASE_BODY()
105 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
106 db.exec("CREATE TABLE t (col INTEGER PRIMARY KEY)"); in ATF_TEST_CASE_BODY()
107 db.exec("INSERT INTO t VALUES (3)"); in ATF_TEST_CASE_BODY()
109 sqlite::transaction tx = db.begin_transaction(); in ATF_TEST_CASE_BODY()
110 db.exec("INSERT INTO t VALUES (5)"); in ATF_TEST_CASE_BODY()
113 ATF_REQUIRE( check_in_table(db, "t", "col", 3)); in ATF_TEST_CASE_BODY()
114 ATF_REQUIRE(!check_in_table(db, "t", "col", 5)); in ATF_TEST_CASE_BODY()
121 sqlite::database db = sqlite::database::in_memory(); in ATF_TEST_CASE_BODY() local
123 sqlite::transaction tx = db.begin_transaction(); in ATF_TEST_CASE_BODY()
124 ATF_REQUIRE_THROW(sqlite::error, db.begin_transaction()); in ATF_TEST_CASE_BODY()