Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
wallet::MockableBatch Class Reference

#include <util.h>

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

Public Member Functions

 MockableBatch (MockableData &records, bool pass)
 
 ~MockableBatch ()
 
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
 
- Public Member Functions inherited from wallet::DatabaseBatch
 DatabaseBatch ()
 
virtual ~DatabaseBatch ()
 
 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 (Span< const std::byte > prefix) override
 

Private Attributes

MockableDatam_records
 
bool m_pass
 

Detailed Description

Definition at line 71 of file util.h.

Constructor & Destructor Documentation

◆ MockableBatch()

wallet::MockableBatch::MockableBatch ( MockableData records,
bool  pass 
)
inlineexplicit

Definition at line 84 of file util.h.

◆ ~MockableBatch()

wallet::MockableBatch::~MockableBatch ( )
inline

Definition at line 85 of file util.h.

Member Function Documentation

◆ Close()

void wallet::MockableBatch::Close ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 88 of file util.h.

◆ EraseKey()

bool wallet::MockableBatch::EraseKey ( DataStream &&  key)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 154 of file util.cpp.

◆ ErasePrefix()

bool wallet::MockableBatch::ErasePrefix ( Span< const std::byte >  prefix)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 173 of file util.cpp.

◆ Flush()

void wallet::MockableBatch::Flush ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 87 of file util.h.

◆ GetNewCursor()

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

Implements wallet::DatabaseBatch.

Definition at line 90 of file util.h.

◆ GetNewPrefixCursor()

std::unique_ptr<DatabaseCursor> wallet::MockableBatch::GetNewPrefixCursor ( Span< const std::byte >  prefix)
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 94 of file util.h.

◆ HasKey()

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

Implements wallet::DatabaseBatch.

Definition at line 164 of file util.cpp.

◆ ReadKey()

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

Implements wallet::DatabaseBatch.

Definition at line 124 of file util.cpp.

Here is the call graph for this function:

◆ TxnAbort()

bool wallet::MockableBatch::TxnAbort ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 99 of file util.h.

◆ TxnBegin()

bool wallet::MockableBatch::TxnBegin ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 97 of file util.h.

◆ TxnCommit()

bool wallet::MockableBatch::TxnCommit ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 98 of file util.h.

◆ WriteKey()

bool wallet::MockableBatch::WriteKey ( DataStream &&  key,
DataStream &&  value,
bool  overwrite = true 
)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 139 of file util.cpp.

Member Data Documentation

◆ m_pass

bool wallet::MockableBatch::m_pass
private

Definition at line 75 of file util.h.

◆ m_records

MockableData& wallet::MockableBatch::m_records
private

Definition at line 74 of file util.h.


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