Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/sqlite.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | |||||
bool SQLiteDatabase::Rewrite(const char *skip) { | bool SQLiteDatabase::Rewrite(const char *skip) { | ||||
return false; | return false; | ||||
} | } | ||||
bool SQLiteDatabase::Backup(const std::string &dest) const { | bool SQLiteDatabase::Backup(const std::string &dest) const { | ||||
return false; | return false; | ||||
} | } | ||||
void SQLiteDatabase::Close() {} | void SQLiteDatabase::Close() { | ||||
int res = sqlite3_close(m_db); | |||||
if (res != SQLITE_OK) { | |||||
throw std::runtime_error( | |||||
strprintf("SQLiteDatabase: Failed to close database: %s\n", | |||||
sqlite3_errstr(res))); | |||||
} | |||||
m_db = nullptr; | |||||
} | |||||
std::unique_ptr<DatabaseBatch> SQLiteDatabase::MakeBatch(bool flush_on_close) { | std::unique_ptr<DatabaseBatch> SQLiteDatabase::MakeBatch(bool flush_on_close) { | ||||
return nullptr; | return nullptr; | ||||
} | } | ||||
SQLiteBatch::SQLiteBatch(SQLiteDatabase &database) : m_database(database) { | SQLiteBatch::SQLiteBatch(SQLiteDatabase &database) : m_database(database) { | ||||
// Make sure we have a db handle | // Make sure we have a db handle | ||||
assert(m_database.m_db); | assert(m_database.m_db); | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |