5#ifndef BITCOIN_WALLET_SQLITE_H
6#define BITCOIN_WALLET_SQLITE_H
32 bool overwrite =
true)
override;
43 void Close()
override;
47 bool &complete)
override;
80 void Close() override;
87 bool Rewrite(
const char *skip =
nullptr)
override;
90 bool Backup(
const std::string &dest)
const override;
111 std::unique_ptr<DatabaseBatch>
112 MakeBatch(
bool flush_on_close =
true)
override;
118std::unique_ptr<SQLiteDatabase>
Double ended buffer combining vector and stream-like interfaces.
RAII class that provides access to a WalletDatabase.
RAII class that provides access to a WalletDatabase.
bool WriteKey(CDataStream &&key, CDataStream &&value, bool overwrite=true) override
sqlite3_stmt * m_read_stmt
sqlite3_stmt * m_cursor_stmt
void SetupSQLStatements()
bool HasKey(CDataStream &&key) override
sqlite3_stmt * m_insert_stmt
sqlite3_stmt * m_overwrite_stmt
bool StartCursor() override
bool EraseKey(CDataStream &&key) override
bool ReadAtCursor(CDataStream &key, CDataStream &value, bool &complete) override
sqlite3_stmt * m_delete_stmt
bool ReadKey(CDataStream &&key, CDataStream &value) override
bool TxnCommit() override
void Flush() override
No-op.
SQLiteDatabase & m_database
void CloseCursor() override
SQLiteBatch(SQLiteDatabase &database)
An instance of this class represents one SQLite3 database.
void Close() override
Close the database.
std::string Filename() override
Return path to main database file for logs and error messages.
void Open() override
Open the database if it is not already opened.
void ReloadDbEnv() override
void IncrementUpdateCounter() override
void RemoveRef() override
Indicate that database user has stopped using the database and that it could be flushed or closed.
std::unique_ptr< DatabaseBatch > MakeBatch(bool flush_on_close=true) override
Make a SQLiteBatch connected to this database.
const std::string m_dir_path
bool Verify(bilingual_str &error)
void AddRef() override
Indicate the a new database user has began using the database.
void Flush() override
No-ops.
bool PeriodicFlush() override
const std::string m_file_path
bool Backup(const std::string &dest) const override
Back up the entire database to a file.
bool Rewrite(const char *skip=nullptr) override
Rewrite the entire database on disk.
An instance of this class represents one database.
std::atomic< unsigned int > nUpdateCounter
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
bool error(const char *fmt, const Args &...args)
Filesystem operations and types.
std::string SQLiteDatabaseVersion()
std::unique_ptr< SQLiteDatabase > MakeSQLiteDatabase(const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
bool ExistsSQLiteDatabase(const fs::path &path)