Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
wallet::WalletDatabase Class Referenceabstract

An instance of this class represents one database. More...

#include <db.h>

Inheritance diagram for wallet::WalletDatabase:
[legend]

Public Member Functions

 WalletDatabase ()=default
 Create dummy DB handle.
virtual ~WalletDatabase ()=default
virtual void Open ()=0
 Open the database if it is not already opened.
virtual bool Rewrite ()=0
 Rewrite the entire database on disk.
virtual bool Backup (const std::string &strDest) const =0
 Back up the entire database to a file.
virtual void Close ()=0
 Flush to the database file and close the database.
virtual std::string Filename ()=0
 Return path to main database file for logs and error messages.
virtual std::vector< fs::path > Files ()=0
 Return paths to all database created files.
virtual std::string Format ()=0
virtual std::unique_ptr< DatabaseBatch > MakeBatch ()=0
 Make a DatabaseBatch connected to this database.

Detailed Description

An instance of this class represents one database.

Definition at line 128 of file db.h.

Constructor & Destructor Documentation

◆ WalletDatabase()

wallet::WalletDatabase::WalletDatabase ( )
default

Create dummy DB handle.

Here is the caller graph for this function:

◆ ~WalletDatabase()

virtual wallet::WalletDatabase::~WalletDatabase ( )
virtualdefault

Member Function Documentation

◆ Backup()

virtual bool wallet::WalletDatabase::Backup ( const std::string & strDest) const
pure virtual

Back up the entire database to a file.

Implemented in wallet::BerkeleyRODatabase, wallet::MockableSQLiteDatabase, and wallet::SQLiteDatabase.

◆ Close()

virtual void wallet::WalletDatabase::Close ( )
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, and wallet::SQLiteDatabase.

◆ Filename()

virtual std::string wallet::WalletDatabase::Filename ( )
pure virtual

Return path to main database file for logs and error messages.

Implemented in wallet::BerkeleyRODatabase, wallet::MockableSQLiteDatabase, and wallet::SQLiteDatabase.

◆ Files()

virtual std::vector< fs::path > wallet::WalletDatabase::Files ( )
pure virtual

Return paths to all database created files.

Implemented in wallet::BerkeleyRODatabase, wallet::InMemoryWalletDatabase, and wallet::SQLiteDatabase.

◆ Format()

virtual std::string wallet::WalletDatabase::Format ( )
pure virtual

Implemented in wallet::BerkeleyRODatabase, wallet::MockableSQLiteDatabase, and wallet::SQLiteDatabase.

Here is the caller graph for this function:

◆ MakeBatch()

virtual std::unique_ptr< DatabaseBatch > wallet::WalletDatabase::MakeBatch ( )
pure virtual

Make a DatabaseBatch connected to this database.

Implemented in wallet::BerkeleyRODatabase, wallet::MockableSQLiteDatabase, and wallet::SQLiteDatabase.

◆ Open()

virtual void wallet::WalletDatabase::Open ( )
pure virtual

Open the database if it is not already opened.

Implemented in wallet::BerkeleyRODatabase, and wallet::SQLiteDatabase.

◆ Rewrite()

virtual bool wallet::WalletDatabase::Rewrite ( )
pure virtual

Rewrite the entire database on disk.

Implemented in wallet::BerkeleyRODatabase, and wallet::SQLiteDatabase.


The documentation for this class was generated from the following file: