An instance of this class represents one SQLite3 database.
More...
#include <sqlite.h>
An instance of this class represents one SQLite3 database.
Definition at line 64 of file sqlite.h.
◆ SQLiteDatabase() [1/2]
wallet::SQLiteDatabase::SQLiteDatabase |
( |
| ) |
|
|
delete |
◆ SQLiteDatabase() [2/2]
Create DB handle to real database.
Definition at line 86 of file sqlite.cpp.
◆ ~SQLiteDatabase()
wallet::SQLiteDatabase::~SQLiteDatabase |
( |
| ) |
|
◆ AddRef()
void wallet::SQLiteDatabase::AddRef |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Backup()
bool wallet::SQLiteDatabase::Backup |
( |
const std::string & |
dest | ) |
const |
|
overridevirtual |
◆ Cleanup()
void wallet::SQLiteDatabase::Cleanup |
( |
| ) |
|
|
privatenoexcept |
◆ Close()
void wallet::SQLiteDatabase::Close |
( |
| ) |
|
|
overridevirtual |
◆ Filename()
std::string wallet::SQLiteDatabase::Filename |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Flush()
void wallet::SQLiteDatabase::Flush |
( |
| ) |
|
|
inlineoverridevirtual |
No-ops.
SQLite always flushes everything to the database file after each transaction (each Read/Write/Erase that we do is its own transaction unless we called TxnBegin) so there is no need to have Flush or Periodic Flush.
There is no DB env to reload, so ReloadDbEnv has nothing to do
Implements wallet::WalletDatabase.
Definition at line 119 of file sqlite.h.
◆ Format()
std::string wallet::SQLiteDatabase::Format |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GUARDED_BY()
static int g_sqlite_count wallet::SQLiteDatabase::GUARDED_BY |
( |
g_sqlite_mutex |
| ) |
|
|
staticprivate |
◆ IncrementUpdateCounter()
void wallet::SQLiteDatabase::IncrementUpdateCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ MakeBatch()
std::unique_ptr< DatabaseBatch > wallet::SQLiteDatabase::MakeBatch |
( |
bool |
flush_on_close = true | ) |
|
|
overridevirtual |
◆ Open()
void wallet::SQLiteDatabase::Open |
( |
| ) |
|
|
overridevirtual |
◆ PeriodicFlush()
bool wallet::SQLiteDatabase::PeriodicFlush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ ReloadDbEnv()
void wallet::SQLiteDatabase::ReloadDbEnv |
( |
| ) |
|
|
inlineoverridevirtual |
◆ RemoveRef()
void wallet::SQLiteDatabase::RemoveRef |
( |
| ) |
|
|
inlineoverridevirtual |
Indicate that database user has stopped using the database and that it could be flushed or closed.
Decrement m_refcount
Implements wallet::WalletDatabase.
Definition at line 102 of file sqlite.h.
◆ Rewrite()
bool wallet::SQLiteDatabase::Rewrite |
( |
const char * |
skip = nullptr | ) |
|
|
overridevirtual |
◆ Verify()
◆ g_sqlite_mutex
Mutex wallet::SQLiteDatabase::g_sqlite_mutex |
|
staticprivate |
This mutex protects SQLite initialization and shutdown.
sqlite3_config() and sqlite3_shutdown() are not thread-safe (sqlite3_initialize() is). Concurrent threads that execute SQLiteDatabase::SQLiteDatabase() should have just one of them do the init and the rest wait for it to complete before all can proceed.
Definition at line 79 of file sqlite.h.
◆ m_db
sqlite3* wallet::SQLiteDatabase::m_db {nullptr} |
◆ m_dir_path
const std::string wallet::SQLiteDatabase::m_dir_path |
|
private |
◆ m_file_path
const std::string wallet::SQLiteDatabase::m_file_path |
|
private |
◆ m_mock
const bool wallet::SQLiteDatabase::m_mock {false} |
|
private |
◆ m_use_unsafe_sync
bool wallet::SQLiteDatabase::m_use_unsafe_sync |
The documentation for this class was generated from the following files: