[#wallet-InMemoryWalletDatabase]
= xref:wallet.adoc[wallet]::InMemoryWalletDatabase
:relfileprefix: ../
:mrdocs:

An in&hyphen;memory SQLiteDatabase&period; Used as a temporary build artifact where no on&hyphen;disk persistence is needed&period;

== Synopsis

Declared in `&lt;wallet&sol;sqlite&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class InMemoryWalletDatabase
    : public xref:wallet/SQLiteDatabase.adoc[SQLiteDatabase]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:wallet/SQLiteDatabase.adoc[SQLiteDatabase]`
| An instance of this class represents one SQLite3 database&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/InMemoryWalletDatabase/2constructor.adoc[`InMemoryWalletDatabase`]         [.small]#[constructor]#
| Construct an in&hyphen;memory database&period;
| xref:wallet/SQLiteDatabase/Backup-02.adoc[`Backup`] 
| Back up the entire database to a file&period;
| xref:wallet/SQLiteDatabase/Close.adoc[`Close`]  [.small]#[virtual]#
| Close the database
| xref:wallet/SQLiteDatabase/Filename.adoc[`Filename`]  [.small]#[virtual]#
| Return the name of the database file&period;
| xref:wallet/InMemoryWalletDatabase/Files.adoc[`Files`]  [.small]#[virtual]#
| Return the paths to this database&apos;s files&semi; empty since it lives in memory&period;
| xref:wallet/SQLiteDatabase/Format.adoc[`Format`]  [.small]#[virtual]#
| Return the name of this database&apos;s storage format&period;
| xref:wallet/SQLiteDatabase/HasActiveTxn.adoc[`HasActiveTxn`] 
| Return true if there is an on&hyphen;going txn in this connection
| xref:wallet/SQLiteDatabase/MakeBatch.adoc[`MakeBatch`]  [.small]#[virtual]#
| Make a SQLiteBatch connected to this database
| xref:wallet/SQLiteDatabase/Open.adoc[`Open`]  [.small]#[virtual]#
| Open the database if it is not already opened
| xref:wallet/SQLiteDatabase/Rewrite.adoc[`Rewrite`]  [.small]#[virtual]#
| Rewrite the entire database on disk
| xref:wallet/SQLiteDatabase/Verify.adoc[`Verify`] 
| Check the integrity of the database&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/SQLiteDatabase/m_db.adoc[`m&lowbar;db`] 
| The underlying SQLite database connection&period;
| xref:wallet/WalletDatabase/m_refcount.adoc[`m&lowbar;refcount`] 
| Counts the number of active database users to be sure that the database is not closed while someone is using it
| xref:wallet/SQLiteDatabase/m_use_unsafe_sync.adoc[`m&lowbar;use&lowbar;unsafe&lowbar;sync`] 
| Whether to use unsafe synchronous settings for faster, less durable writes&period;
| xref:wallet/SQLiteDatabase/m_write_semaphore.adoc[`m&lowbar;write&lowbar;semaphore`] 
| Semaphore ensuring only one batch writes to the database at a time&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/RunWithinTxn.adoc[`RunWithinTxn`]
| Executes the provided function &apos;func&apos; within a database transaction context&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
