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