[#wallet-BerkeleyRODatabase] = xref:wallet.adoc[wallet]::BerkeleyRODatabase :relfileprefix: ../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BerkeleyRODatabase : 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/BerkeleyRODatabase/2constructor.adoc[`BerkeleyRODatabase`] [.small]#[constructor]# | Create DB handle | xref:wallet/BerkeleyRODatabase/2destructor.adoc[`~BerkeleyRODatabase`] [.small]#[destructor]# [.small]#[virtual]# | Destroy the database handle. | xref:wallet/BerkeleyRODatabase/Backup.adoc[`Backup`] [.small]#[virtual]# | Back up the entire database to a file. | xref:wallet/BerkeleyRODatabase/Close.adoc[`Close`] [.small]#[virtual]# | Flush to the database file and close the database. Also close the environment if no other databases are open in it. | xref:wallet/BerkeleyRODatabase/Filename.adoc[`Filename`] [.small]#[virtual]# | Return path to main database file for logs and error messages. | xref:wallet/BerkeleyRODatabase/Files.adoc[`Files`] [.small]#[virtual]# | Return the paths to all files that make up this database. | xref:wallet/BerkeleyRODatabase/Format.adoc[`Format`] [.small]#[virtual]# | Return the name of this database's storage format. | xref:wallet/BerkeleyRODatabase/MakeBatch.adoc[`MakeBatch`] [.small]#[virtual]# | Make a DatabaseBatch connected to this database | xref:wallet/BerkeleyRODatabase/Open.adoc[`Open`] [.small]#[virtual]# | Open the database if it is not already opened. | xref:wallet/BerkeleyRODatabase/Rewrite.adoc[`Rewrite`] [.small]#[virtual]# | Rewrite the entire database on disk |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:wallet/BerkeleyRODatabase/m_records.adoc[`m_records`] | The records read from the database file. | 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 |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/MakeBerkeleyRODatabase.adoc[`MakeBerkeleyRODatabase`] | Return object giving access to Berkeley Read Only database at specified path. | xref:wallet/RunWithinTxn.adoc[`RunWithinTxn`] | Executes the provided function 'func' within a database transaction context. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#