- Because tizen-database does not support full set of sqlite3 API,
this method may be needed
- Make a method as 'const'
Change-Id: I1b8c3d05b298cf943b2fde07510a8cdbc70e9e03
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
EXPECT_EQ(ret, SQLITE_OK);
}
+
+TEST_F(DatabaseTest, test_get_raw) {
+ tizen_base::Database db(TEST_DB, SQLITE_OPEN_READWRITE);
+ auto* db_raw = db.GetRaw();
+
+ EXPECT_NE(db_raw, nullptr);
+}
r == SQLITE_DONE ? true : false };
}
- bool Exec(const Sql& sql, Result& previous_stmt) {
+ bool Exec(const Sql& sql, Result& previous_stmt) const {
if (sql.GetQuery() != previous_stmt.GetQuery())
throw DbException("Query is different");
}
}
+ sqlite3* GetRaw() const {
+ if (!db_)
+ throw DbException("Not opened");
+ return db_;
+ }
+
private:
void Bind(int pos, const DbType& type, sqlite3_stmt* stmt) const {
int r;