Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
wallet::BerkeleyROBatch Class Reference

RAII class that provides access to a BerkeleyRODatabase. More...

#include <migrate.h>

Inheritance diagram for wallet::BerkeleyROBatch:
[legend]
Collaboration diagram for wallet::BerkeleyROBatch:
[legend]

Public Member Functions

 BerkeleyROBatch (const BerkeleyRODatabase &database)
 ~BerkeleyROBatch ()=default
 BerkeleyROBatch (const BerkeleyROBatch &)=delete
BerkeleyROBatchoperator= (const BerkeleyROBatch &)=delete
void Close () override
std::unique_ptr< DatabaseCursorGetNewCursor () override
std::unique_ptr< DatabaseCursorGetNewPrefixCursor (std::span< const std::byte > prefix) override
bool TxnBegin () override
bool TxnCommit () override
bool TxnAbort () override
bool HasActiveTxn () override
Public Member Functions inherited from wallet::DatabaseBatch
 DatabaseBatch ()=default
virtual ~DatabaseBatch ()=default
 DatabaseBatch (const DatabaseBatch &)=delete
DatabaseBatchoperator= (const DatabaseBatch &)=delete
template<typename K, typename T>
bool Read (const K &key, T &value)
template<typename K, typename T>
bool Write (const K &key, const T &value, bool fOverwrite=true)
template<typename K>
bool Erase (const K &key)
template<typename K>
bool Exists (const K &key)

Private Member Functions

bool ReadKey (DataStream &&key, DataStream &value) override
bool WriteKey (DataStream &&key, DataStream &&value, bool overwrite=true) override
bool EraseKey (DataStream &&key) override
bool HasKey (DataStream &&key) override
bool ErasePrefix (std::span< const std::byte > prefix) override

Private Attributes

const BerkeleyRODatabasem_database

Detailed Description

RAII class that provides access to a BerkeleyRODatabase.

Definition at line 76 of file migrate.h.

Constructor & Destructor Documentation

◆ BerkeleyROBatch() [1/2]

wallet::BerkeleyROBatch::BerkeleyROBatch ( const BerkeleyRODatabase & database)
inlineexplicit

Definition at line 90 of file migrate.h.

Here is the caller graph for this function:

◆ ~BerkeleyROBatch()

wallet::BerkeleyROBatch::~BerkeleyROBatch ( )
default

◆ BerkeleyROBatch() [2/2]

wallet::BerkeleyROBatch::BerkeleyROBatch ( const BerkeleyROBatch & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ Close()

void wallet::BerkeleyROBatch::Close ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 96 of file migrate.h.

◆ EraseKey()

bool wallet::BerkeleyROBatch::EraseKey ( DataStream && key)
inlineoverrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 85 of file migrate.h.

◆ ErasePrefix()

bool wallet::BerkeleyROBatch::ErasePrefix ( std::span< const std::byte > prefix)
inlineoverrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 87 of file migrate.h.

◆ GetNewCursor()

std::unique_ptr< DatabaseCursor > wallet::BerkeleyROBatch::GetNewCursor ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 98 of file migrate.h.

◆ GetNewPrefixCursor()

std::unique_ptr< DatabaseCursor > wallet::BerkeleyROBatch::GetNewPrefixCursor ( std::span< const std::byte > prefix)
overridevirtual

Implements wallet::DatabaseBatch.

Definition at line 770 of file migrate.cpp.

◆ HasActiveTxn()

bool wallet::BerkeleyROBatch::HasActiveTxn ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 103 of file migrate.h.

◆ HasKey()

bool wallet::BerkeleyROBatch::HasKey ( DataStream && key)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 747 of file migrate.cpp.

◆ operator=()

BerkeleyROBatch & wallet::BerkeleyROBatch::operator= ( const BerkeleyROBatch & )
delete
Here is the call graph for this function:

◆ ReadKey()

bool wallet::BerkeleyROBatch::ReadKey ( DataStream && key,
DataStream & value )
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 734 of file migrate.cpp.

Here is the call graph for this function:

◆ TxnAbort()

bool wallet::BerkeleyROBatch::TxnAbort ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 102 of file migrate.h.

◆ TxnBegin()

bool wallet::BerkeleyROBatch::TxnBegin ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 100 of file migrate.h.

◆ TxnCommit()

bool wallet::BerkeleyROBatch::TxnCommit ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 101 of file migrate.h.

◆ WriteKey()

bool wallet::BerkeleyROBatch::WriteKey ( DataStream && key,
DataStream && value,
bool overwrite = true )
inlineoverrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 84 of file migrate.h.

Member Data Documentation

◆ m_database

const BerkeleyRODatabase& wallet::BerkeleyROBatch::m_database
private

Definition at line 79 of file migrate.h.


The documentation for this class was generated from the following files: