[#wallet-DatabaseBatch] = xref:wallet.adoc[wallet]::DatabaseBatch :relfileprefix: ../ :mrdocs: RAII class that provides access to a WalletDatabase == Synopsis Declared in `<wallet/db.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DatabaseBatch; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/DatabaseBatch/2constructor-02.adoc[`DatabaseBatch`] [.small]#[constructor]# | Constructors | xref:wallet/DatabaseBatch/2destructor.adoc[`~DatabaseBatch`] [.small]#[destructor]# [.small]#[virtual]# | Destroys the batch. | xref:wallet/DatabaseBatch/operator_assign.adoc[`operator=`] [.small]#[deleted]# | Batches are non‐copyable. | xref:wallet/DatabaseBatch/Close.adoc[`Close`] [.small]#[virtual]# | Closes the batch. | xref:wallet/DatabaseBatch/Erase.adoc[`Erase`] | Erases the record stored under a key. | xref:wallet/DatabaseBatch/ErasePrefix.adoc[`ErasePrefix`] [.small]#[virtual]# | Erases all records whose key begins with the given prefix. | xref:wallet/DatabaseBatch/Exists.adoc[`Exists`] | Returns whether a record exists for a key. | xref:wallet/DatabaseBatch/GetNewCursor.adoc[`GetNewCursor`] [.small]#[virtual]# | Returns a cursor over all records in the database. | xref:wallet/DatabaseBatch/GetNewPrefixCursor.adoc[`GetNewPrefixCursor`] [.small]#[virtual]# | Returns a cursor over records whose key begins with the given prefix. | xref:wallet/DatabaseBatch/HasActiveTxn.adoc[`HasActiveTxn`] [.small]#[virtual]# | Returns whether a database transaction is currently active. | xref:wallet/DatabaseBatch/Read.adoc[`Read`] | Reads the value stored under a key. | xref:wallet/DatabaseBatch/TxnAbort.adoc[`TxnAbort`] [.small]#[virtual]# | Aborts the current transaction. | xref:wallet/DatabaseBatch/TxnBegin.adoc[`TxnBegin`] [.small]#[virtual]# | Begins a database transaction. | xref:wallet/DatabaseBatch/TxnCommit.adoc[`TxnCommit`] [.small]#[virtual]# | Commits the current transaction. | xref:wallet/DatabaseBatch/Write.adoc[`Write`] | Writes a value under a key. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:wallet/BerkeleyROBatch.adoc[`BerkeleyROBatch`] | RAII class that provides access to a BerkeleyRODatabase | xref:wallet/SQLiteBatch.adoc[`SQLiteBatch`] | RAII class that provides access to a WalletDatabase |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#