wallet::BerkeleyRODatabase

A class representing a BerkeleyDB file from which we can only read records. This is used only for migration of legacy to descriptor wallets

Synopsis

Declared in <wallet/migrate.h>

class BerkeleyRODatabase
    : public WalletDatabase

Base Classes

NameDescription
WalletDatabaseAn instance of this class represents one database.

Member Functions

NameDescription
BerkeleyRODatabase [constructor]Create DB handle
~BerkeleyRODatabase [destructor] [virtual]Destroy the database handle.
Backup [virtual]Back up the entire database to a file.
Close [virtual]Flush to the database file and close the database. Also close the environment if no other databases are open in it.
Filename [virtual]Return path to main database file for logs and error messages.
Files [virtual]Return the paths to all files that make up this database.
Format [virtual]Return the name of this database's storage format.
MakeBatch [virtual]Make a DatabaseBatch connected to this database
Open [virtual]Open the database if it is not already opened.
Rewrite [virtual]Rewrite the entire database on disk

Data Members

NameDescription
m_records The records read from the database file.
m_refcount Counts the number of active database users to be sure that the database is not closed while someone is using it

Non-Member Functions

NameDescription
MakeBerkeleyRODatabaseReturn object giving access to Berkeley Read Only database at specified path.
RunWithinTxnExecutes the provided function 'func' within a database transaction context.