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

RAII class that provides access to a WalletDatabase

== Synopsis

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

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

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:wallet/DatabaseBatch.adoc[DatabaseBatch]`
| RAII class that provides access to a WalletDatabase
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/SQLiteBatch/2constructor.adoc[`SQLiteBatch`]         [.small]#[constructor]#
| Construct a batch connected to the given database&period;
| xref:wallet/SQLiteBatch/2destructor.adoc[`&#126;SQLiteBatch`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy the batch, closing it first&period;
| xref:wallet/DatabaseBatch/operator_assign.adoc[`operator&equals;`]  [.small]#[deleted]#
| Batches are non&hyphen;copyable&period;
| xref:wallet/SQLiteBatch/Close.adoc[`Close`]  [.small]#[virtual]#
| Close the batch and finalize its prepared statements&period;
| xref:wallet/DatabaseBatch/Erase.adoc[`Erase`] 
| Erases the record stored under a key&period;
| xref:wallet/DatabaseBatch/ErasePrefix.adoc[`ErasePrefix`]  [.small]#[virtual]#
| Erases all records whose key begins with the given prefix&period;
| xref:wallet/DatabaseBatch/Exists.adoc[`Exists`] 
| Returns whether a record exists for a key&period;
| xref:wallet/SQLiteBatch/GetNewCursor.adoc[`GetNewCursor`]  [.small]#[virtual]#
| Get a cursor iterating over all records in the database&period;
| xref:wallet/SQLiteBatch/GetNewPrefixCursor.adoc[`GetNewPrefixCursor`]  [.small]#[virtual]#
| Get a cursor iterating over records whose key starts with a prefix&period;
| xref:wallet/SQLiteBatch/HasActiveTxn.adoc[`HasActiveTxn`]  [.small]#[virtual]#
| Report whether this batch has started a transaction&period;
| xref:wallet/DatabaseBatch/Read.adoc[`Read`] 
| Reads the value stored under a key&period;
| xref:wallet/SQLiteBatch/SetExecHandler.adoc[`SetExecHandler`] 
| Replace the handler used to execute SQL statements for this batch&period;
| xref:wallet/SQLiteBatch/TxnAbort.adoc[`TxnAbort`]  [.small]#[virtual]#
| Abort the current database transaction&period;
| xref:wallet/SQLiteBatch/TxnBegin.adoc[`TxnBegin`]  [.small]#[virtual]#
| Begin a database transaction&period;
| xref:wallet/SQLiteBatch/TxnCommit.adoc[`TxnCommit`]  [.small]#[virtual]#
| Commit the current database transaction&period;
| xref:wallet/DatabaseBatch/Write.adoc[`Write`] 
| Writes a value under a key&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/SQLiteBatch/EraseKey.adoc[`EraseKey`]  [.small]#[virtual]#
| Erase the record stored under a key&period;
| xref:wallet/SQLiteBatch/ErasePrefix.adoc[`ErasePrefix`]  [.small]#[virtual]#
| Erase all records whose key starts with a prefix&period;
| xref:wallet/SQLiteBatch/HasKey.adoc[`HasKey`]  [.small]#[virtual]#
| Report whether a key exists in the database&period;
| xref:wallet/SQLiteBatch/ReadKey.adoc[`ReadKey`]  [.small]#[virtual]#
| Read the value stored under a key&period;
| xref:wallet/SQLiteBatch/WriteKey.adoc[`WriteKey`]  [.small]#[virtual]#
| Write a value under a key&period;
|===



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