![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
An instance of this class represents one database. More...
#include <db.h>
Public Member Functions | |
| WalletDatabase ()=default | |
| Create dummy DB handle. More... | |
| virtual | ~WalletDatabase ()=default |
| virtual void | Open ()=0 |
| Open the database if it is not already opened. More... | |
| virtual bool | Rewrite ()=0 |
| Rewrite the entire database on disk. More... | |
| virtual bool | Backup (const std::string &strDest) const =0 |
| Back up the entire database to a file. More... | |
| virtual void | Close ()=0 |
| Flush to the database file and close the database. More... | |
| virtual std::string | Filename ()=0 |
| Return path to main database file for logs and error messages. More... | |
| virtual std::vector< fs::path > | Files ()=0 |
| Return paths to all database created files. More... | |
| virtual std::string | Format ()=0 |
| virtual std::unique_ptr< DatabaseBatch > | MakeBatch ()=0 |
| Make a DatabaseBatch connected to this database. More... | |
Public Attributes | |
| std::atomic< int > | m_refcount {0} |
| Counts the number of active database users to be sure that the database is not closed while someone is using it. More... | |
|
default |
Create dummy DB handle.
|
virtualdefault |
|
pure virtual |
Back up the entire database to a file.
Implemented in wallet::SQLiteDatabase, wallet::BerkeleyRODatabase, and wallet::MockableDatabase.
|
pure virtual |
Flush to the database file and close the database.
Also close the environment if no other databases are open in it.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Return path to main database file for logs and error messages.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Return paths to all database created files.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Make a DatabaseBatch connected to this database.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Open the database if it is not already opened.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
|
pure virtual |
Rewrite the entire database on disk.
Implemented in wallet::BerkeleyRODatabase, wallet::SQLiteDatabase, and wallet::MockableDatabase.
| std::atomic<int> wallet::WalletDatabase::m_refcount {0} |