An instance of this class represents one database.

Synopsis

Declared in <wallet/db.h>

class WalletDatabase;

Member Functions

Name

Description

WalletDatabase [constructor]

Create dummy DB handle

~WalletDatabase [destructor] [virtual]

Destroys 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 paths to all database created files

Format [virtual]

Returns the name of the database 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

Name

Description

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

Name

Description

MakeDatabase

Creates or opens a wallet database at the given path.

MakeInMemoryWalletDatabase

Create a new in‐memory wallet database.

MakeWalletDatabase

Open the database backend for a wallet.

RunWithinTxn

Executes the provided function 'func' within a database transaction context.

Derived Classes

Name

Description

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

SQLiteDatabase

An instance of this class represents one SQLite3 database.

Created with MrDocs