Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
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 CDBWrapper & parent
const std::unique_ptr< WriteBatchImpl > m_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 88 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 184 of file dbwrapper.cpp.

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

◆ ~CDBBatch()

CDBBatch::~CDBBatch ( )
default
Here is the call graph for this function:

Member Function Documentation

◆ ApproximateSize()

size_t CDBBatch::ApproximateSize ( ) const

Definition at line 216 of file dbwrapper.cpp.

Here is the caller graph for this function:

◆ Clear()

void CDBBatch::Clear ( )

Definition at line 195 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 122 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 210 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 113 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 202 of file dbwrapper.cpp.

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

◆ CDBWrapper

friend class CDBWrapper
friend

Definition at line 90 of file dbwrapper.h.

Member Data Documentation

◆ m_impl_batch

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

Definition at line 96 of file dbwrapper.h.

◆ m_key_scratch

DataStream CDBBatch::m_key_scratch {}
private

Definition at line 98 of file dbwrapper.h.

◆ m_value_scratch

DataStream CDBBatch::m_value_scratch {}
private

Definition at line 99 of file dbwrapper.h.

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 93 of file dbwrapper.h.


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