[#wallet-SQLiteDatabase] = xref:wallet.adoc[wallet]::SQLiteDatabase :relfileprefix: ../ :mrdocs: An instance of this class represents one SQLite3 database. == Synopsis Declared in `<wallet/sqlite.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class SQLiteDatabase : public xref:wallet/WalletDatabase.adoc[WalletDatabase] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:wallet/WalletDatabase.adoc[WalletDatabase]` | An instance of this class represents one database. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/SQLiteDatabase/2constructor-0a.adoc[`SQLiteDatabase`] [.small]#[constructor]# | Constructors | xref:wallet/SQLiteDatabase/2destructor.adoc[`~SQLiteDatabase`] [.small]#[destructor]# [.small]#[virtual]# | Destroy the handle and clean up the SQLite connection. | xref:wallet/SQLiteDatabase/Backup-02.adoc[`Backup`] | Back up the entire database to a file. | 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. | xref:wallet/SQLiteDatabase/Files.adoc[`Files`] [.small]#[virtual]# | Return paths to all database created files | xref:wallet/SQLiteDatabase/Format.adoc[`Format`] [.small]#[virtual]# | Return the name of this database's storage format. | xref:wallet/SQLiteDatabase/HasActiveTxn.adoc[`HasActiveTxn`] | Return true if there is an on‐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. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:wallet/SQLiteDatabase/m_db.adoc[`m_db`] | The underlying SQLite database connection. | xref:wallet/WalletDatabase/m_refcount.adoc[`m_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_use_unsafe_sync`] | Whether to use unsafe synchronous settings for faster, less durable writes. | xref:wallet/SQLiteDatabase/m_write_semaphore.adoc[`m_write_semaphore`] | Semaphore ensuring only one batch writes to the database at a time. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/SQLiteDatabase/2constructor-0c.adoc[`SQLiteDatabase`] [.small]#[constructor]# | Construct a database handle with extra SQLite open flags. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:wallet/SQLiteBatch.adoc[wallet::SQLiteBatch]` | RAII class that provides access to a WalletDatabase |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/MakeSQLiteDatabase.adoc[`MakeSQLiteDatabase`] | Open or create a SQLite wallet database at the given path. | xref:wallet/RunWithinTxn.adoc[`RunWithinTxn`] | Executes the provided function 'func' within a database transaction context. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:wallet/InMemoryWalletDatabase.adoc[`InMemoryWalletDatabase`] | An in‐memory SQLiteDatabase. Used as a temporary build artifact where no on‐disk persistence is needed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#