An in‐memory SQLiteDatabase. Used as a temporary build artifact where no on‐disk persistence is needed.

Synopsis

Declared in <wallet/sqlite.h>

class InMemoryWalletDatabase
    : public SQLiteDatabase

Base Classes

Name

Description

SQLiteDatabase

An instance of this class represents one SQLite3 database.

Member Functions

Name

Description

InMemoryWalletDatabase [constructor]

Construct an in‐memory database.

Backup

Back up the entire database to a file.

Close [virtual]

Close the database

Filename [virtual]

Return the name of the database file.

Files [virtual]

Return the paths to this database's files; empty since it lives in memory.

Format [virtual]

Return the name of this database's storage format.

HasActiveTxn

Return true if there is an on‐going txn in this connection

MakeBatch [virtual]

Make a SQLiteBatch connected to this database

Open [virtual]

Open the database if it is not already opened

Rewrite [virtual]

Rewrite the entire database on disk

Verify

Check the integrity of the database.

Data Members

Name

Description

m_db

The underlying SQLite database connection.

m_refcount

Counts the number of active database users to be sure that the database is not closed while someone is using it

m_use_unsafe_sync

Whether to use unsafe synchronous settings for faster, less durable writes.

m_write_semaphore

Semaphore ensuring only one batch writes to the database at a time.

Non-Member Functions

Name

Description

RunWithinTxn

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

Created with MrDocs