RAII class that provides access to a WalletDatabase.
More...
#include <sqlite.h>
RAII class that provides access to a WalletDatabase.
Definition at line 49 of file sqlite.h.
◆ SQLiteBatch()
◆ ~SQLiteBatch()
wallet::SQLiteBatch::~SQLiteBatch |
( |
| ) |
|
|
inlineoverride |
◆ Close()
void wallet::SQLiteBatch::Close |
( |
| ) |
|
|
overridevirtual |
◆ EraseKey()
bool wallet::SQLiteBatch::EraseKey |
( |
DataStream && |
key | ) |
|
|
overrideprivatevirtual |
◆ ErasePrefix()
bool wallet::SQLiteBatch::ErasePrefix |
( |
Span< const std::byte > |
prefix | ) |
|
|
overrideprivatevirtual |
◆ ExecStatement()
bool wallet::SQLiteBatch::ExecStatement |
( |
sqlite3_stmt * |
stmt, |
|
|
Span< const std::byte > |
blob |
|
) |
| |
|
private |
◆ Flush()
void wallet::SQLiteBatch::Flush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetNewCursor()
std::unique_ptr< DatabaseCursor > wallet::SQLiteBatch::GetNewCursor |
( |
| ) |
|
|
overridevirtual |
◆ GetNewPrefixCursor()
std::unique_ptr< DatabaseCursor > wallet::SQLiteBatch::GetNewPrefixCursor |
( |
Span< const std::byte > |
prefix | ) |
|
|
overridevirtual |
◆ HasActiveTxn()
bool wallet::SQLiteBatch::HasActiveTxn |
( |
| ) |
|
|
inlineoverridevirtual |
◆ HasKey()
bool wallet::SQLiteBatch::HasKey |
( |
DataStream && |
key | ) |
|
|
overrideprivatevirtual |
◆ ReadKey()
◆ SetExecHandler()
void wallet::SQLiteBatch::SetExecHandler |
( |
std::unique_ptr< SQliteExecHandler > && |
handler | ) |
|
|
inline |
◆ SetupSQLStatements()
void wallet::SQLiteBatch::SetupSQLStatements |
( |
| ) |
|
|
private |
◆ TxnAbort()
bool wallet::SQLiteBatch::TxnAbort |
( |
| ) |
|
|
overridevirtual |
◆ TxnBegin()
bool wallet::SQLiteBatch::TxnBegin |
( |
| ) |
|
|
overridevirtual |
◆ TxnCommit()
bool wallet::SQLiteBatch::TxnCommit |
( |
| ) |
|
|
overridevirtual |
◆ WriteKey()
bool wallet::SQLiteBatch::WriteKey |
( |
DataStream && |
key, |
|
|
DataStream && |
value, |
|
|
bool |
overwrite = true |
|
) |
| |
|
overrideprivatevirtual |
◆ m_database
◆ m_delete_prefix_stmt
sqlite3_stmt* wallet::SQLiteBatch::m_delete_prefix_stmt {nullptr} |
|
private |
◆ m_delete_stmt
sqlite3_stmt* wallet::SQLiteBatch::m_delete_stmt {nullptr} |
|
private |
◆ m_exec_handler
◆ m_insert_stmt
sqlite3_stmt* wallet::SQLiteBatch::m_insert_stmt {nullptr} |
|
private |
◆ m_overwrite_stmt
sqlite3_stmt* wallet::SQLiteBatch::m_overwrite_stmt {nullptr} |
|
private |
◆ m_read_stmt
sqlite3_stmt* wallet::SQLiteBatch::m_read_stmt {nullptr} |
|
private |
◆ m_txn
bool wallet::SQLiteBatch::m_txn {false} |
|
private |
Whether this batch has started a database transaction and whether it owns SQLiteDatabase::m_write_semaphore.
If the batch starts a db tx, it acquires the semaphore and sets this to true, keeping the semaphore until the transaction ends to prevent other batch objects from writing to the database.
If this batch did not start a transaction, the semaphore is acquired transiently when writing and m_txn is not set.
m_txn is different from HasActiveTxn() as it is only true when this batch has started the transaction, not just when any batch has started a transaction.
Definition at line 71 of file sqlite.h.
The documentation for this class was generated from the following files: