Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CDBBatch Class Reference

Batch of changes queued to be written to a CDBWrapper. More...

#include <dbwrapper.h>

Collaboration diagram for CDBBatch:
[legend]

Classes

struct  WriteBatchImpl
 

Public Member Functions

 CDBBatch (const CDBWrapper &_parent)
 
 ~CDBBatch ()
 
void Clear ()
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename K >
void Erase (const K &key)
 
size_t ApproximateSize () const
 

Private Member Functions

void WriteImpl (std::span< const std::byte > key, DataStream &value)
 
void EraseImpl (std::span< const std::byte > key)
 

Private Attributes

const CDBWrapperparent
 
const std::unique_ptr< WriteBatchImplm_impl_batch
 
DataStream m_key_scratch {}
 
DataStream m_value_scratch {}
 

Friends

class CDBWrapper
 

Detailed Description

Batch of changes queued to be written to a CDBWrapper.

Definition at line 82 of file dbwrapper.h.

Constructor & Destructor Documentation

◆ CDBBatch()

CDBBatch::CDBBatch ( const CDBWrapper _parent)
explicit
Parameters
[in]_parentCDBWrapper that this batch is to be submitted to

Definition at line 161 of file dbwrapper.cpp.

Here is the call graph for this function:

◆ ~CDBBatch()

CDBBatch::~CDBBatch ( )
default

Member Function Documentation

◆ ApproximateSize()

size_t CDBBatch::ApproximateSize ( ) const

Definition at line 193 of file dbwrapper.cpp.

Here is the caller graph for this function:

◆ Clear()

void CDBBatch::Clear ( )

Definition at line 172 of file dbwrapper.cpp.

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

◆ Erase()

template<typename K >
void CDBBatch::Erase ( const K key)
inline

Definition at line 116 of file dbwrapper.h.

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

◆ EraseImpl()

void CDBBatch::EraseImpl ( std::span< const std::byte >  key)
private

Definition at line 187 of file dbwrapper.cpp.

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

◆ Write()

template<typename K , typename V >
void CDBBatch::Write ( const K key,
const V &  value 
)
inline

Definition at line 107 of file dbwrapper.h.

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

◆ WriteImpl()

void CDBBatch::WriteImpl ( std::span< const std::byte >  key,
DataStream value 
)
private

Definition at line 179 of file dbwrapper.cpp.

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

Friends And Related Function Documentation

◆ CDBWrapper

friend class CDBWrapper
friend

Definition at line 84 of file dbwrapper.h.

Member Data Documentation

◆ m_impl_batch

const std::unique_ptr<WriteBatchImpl> CDBBatch::m_impl_batch
private

Definition at line 90 of file dbwrapper.h.

◆ m_key_scratch

DataStream CDBBatch::m_key_scratch {}
private

Definition at line 92 of file dbwrapper.h.

◆ m_value_scratch

DataStream CDBBatch::m_value_scratch {}
private

Definition at line 93 of file dbwrapper.h.

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 87 of file dbwrapper.h.


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