Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 Flush () override
 
void Close () override
 
std::unique_ptr< DatabaseCursorGetNewCursor () override
 
std::unique_ptr< DatabaseCursorGetNewPrefixCursor (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
 
virtual void Flush ()=0
 
virtual void Close ()=0
 
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)
 
virtual bool ErasePrefix (Span< const std::byte > prefix)=0
 
virtual std::unique_ptr< DatabaseCursorGetNewCursor ()=0
 
virtual std::unique_ptr< DatabaseCursorGetNewPrefixCursor (Span< const std::byte > prefix)=0
 
virtual bool TxnBegin ()=0
 
virtual bool TxnCommit ()=0
 
virtual bool TxnAbort ()=0
 
virtual bool HasActiveTxn ()=0
 

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 (Span< const std::byte > prefix) override
 

Private Attributes

const BerkeleyRODatabasem_database
 

Detailed Description

RAII class that provides access to a BerkeleyRODatabase.

Definition at line 90 of file migrate.h.

Constructor & Destructor Documentation

◆ BerkeleyROBatch() [1/2]

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

Definition at line 104 of file migrate.h.

◆ ~BerkeleyROBatch()

wallet::BerkeleyROBatch::~BerkeleyROBatch ( )
default

◆ BerkeleyROBatch() [2/2]

wallet::BerkeleyROBatch::BerkeleyROBatch ( const BerkeleyROBatch )
delete

Member Function Documentation

◆ Close()

void wallet::BerkeleyROBatch::Close ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 111 of file migrate.h.

◆ EraseKey()

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

Implements wallet::DatabaseBatch.

Definition at line 99 of file migrate.h.

◆ ErasePrefix()

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

Implements wallet::DatabaseBatch.

Definition at line 101 of file migrate.h.

◆ Flush()

void wallet::BerkeleyROBatch::Flush ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 110 of file migrate.h.

◆ GetNewCursor()

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

Implements wallet::DatabaseBatch.

Definition at line 113 of file migrate.h.

◆ GetNewPrefixCursor()

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

Implements wallet::DatabaseBatch.

Definition at line 766 of file migrate.cpp.

◆ HasActiveTxn()

bool wallet::BerkeleyROBatch::HasActiveTxn ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 118 of file migrate.h.

◆ HasKey()

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

Implements wallet::DatabaseBatch.

Definition at line 743 of file migrate.cpp.

◆ operator=()

BerkeleyROBatch & wallet::BerkeleyROBatch::operator= ( const BerkeleyROBatch )
delete

◆ ReadKey()

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

Implements wallet::DatabaseBatch.

Definition at line 730 of file migrate.cpp.

Here is the call graph for this function:

◆ TxnAbort()

bool wallet::BerkeleyROBatch::TxnAbort ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 117 of file migrate.h.

◆ TxnBegin()

bool wallet::BerkeleyROBatch::TxnBegin ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 115 of file migrate.h.

◆ TxnCommit()

bool wallet::BerkeleyROBatch::TxnCommit ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 116 of file migrate.h.

◆ WriteKey()

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

Implements wallet::DatabaseBatch.

Definition at line 98 of file migrate.h.

Member Data Documentation

◆ m_database

const BerkeleyRODatabase& wallet::BerkeleyROBatch::m_database
private

Definition at line 93 of file migrate.h.


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