Bitcoin Core  0.20.99
P2P Digital Currency
Public Member Functions | Private Member Functions | List of all members
DatabaseBatch Class Referenceabstract

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

#include <db.h>

Inheritance diagram for DatabaseBatch:
[legend]

Public Member Functions

 DatabaseBatch ()
 
virtual ~DatabaseBatch ()
 
 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 StartCursor ()=0
 
virtual bool ReadAtCursor (CDataStream &ssKey, CDataStream &ssValue, bool &complete)=0
 
virtual void CloseCursor ()=0
 
virtual bool TxnBegin ()=0
 
virtual bool TxnCommit ()=0
 
virtual bool TxnAbort ()=0
 

Private Member Functions

virtual bool ReadKey (CDataStream &&key, CDataStream &value)=0
 
virtual bool WriteKey (CDataStream &&key, CDataStream &&value, bool overwrite=true)=0
 
virtual bool EraseKey (CDataStream &&key)=0
 
virtual bool HasKey (CDataStream &&key)=0
 

Detailed Description

RAII class that provides access to a WalletDatabase.

Definition at line 25 of file db.h.

Constructor & Destructor Documentation

◆ DatabaseBatch() [1/2]

DatabaseBatch::DatabaseBatch ( )
inlineexplicit

Definition at line 34 of file db.h.

Here is the caller graph for this function:

◆ ~DatabaseBatch()

virtual DatabaseBatch::~DatabaseBatch ( )
inlinevirtual

Definition at line 35 of file db.h.

Here is the call graph for this function:

◆ DatabaseBatch() [2/2]

DatabaseBatch::DatabaseBatch ( const DatabaseBatch )
delete

Member Function Documentation

◆ Close()

virtual void DatabaseBatch::Close ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ CloseCursor()

virtual void DatabaseBatch::CloseCursor ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ Erase()

template<typename K >
bool DatabaseBatch::Erase ( const K &  key)
inline

Definition at line 75 of file db.h.

Here is the call graph for this function:

◆ EraseKey()

virtual bool DatabaseBatch::EraseKey ( CDataStream &&  key)
privatepure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ Exists()

template<typename K >
bool DatabaseBatch::Exists ( const K &  key)
inline

Definition at line 85 of file db.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Flush()

virtual void DatabaseBatch::Flush ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ HasKey()

virtual bool DatabaseBatch::HasKey ( CDataStream &&  key)
privatepure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ operator=()

DatabaseBatch& DatabaseBatch::operator= ( const DatabaseBatch )
delete
Here is the caller graph for this function:

◆ Read()

template<typename K , typename T >
bool DatabaseBatch::Read ( const K &  key,
T &  value 
)
inline

Definition at line 44 of file db.h.

Here is the call graph for this function:

◆ ReadAtCursor()

virtual bool DatabaseBatch::ReadAtCursor ( CDataStream ssKey,
CDataStream ssValue,
bool &  complete 
)
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ ReadKey()

virtual bool DatabaseBatch::ReadKey ( CDataStream &&  key,
CDataStream value 
)
privatepure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ StartCursor()

virtual bool DatabaseBatch::StartCursor ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ TxnAbort()

virtual bool DatabaseBatch::TxnAbort ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ TxnBegin()

virtual bool DatabaseBatch::TxnBegin ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ TxnCommit()

virtual bool DatabaseBatch::TxnCommit ( )
pure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

◆ Write()

template<typename K , typename T >
bool DatabaseBatch::Write ( const K &  key,
const T &  value,
bool  fOverwrite = true 
)
inline

Definition at line 61 of file db.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteKey()

virtual bool DatabaseBatch::WriteKey ( CDataStream &&  key,
CDataStream &&  value,
bool  overwrite = true 
)
privatepure virtual

Implemented in BerkeleyBatch, DummyBatch, and SQLiteBatch.

Here is the caller graph for this function:

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