Bitcoin Core 31.0.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 &ssValue)
void EraseImpl (std::span< const std::byte > key)

Private Attributes

const CDBWrapperparent
const std::unique_ptr< WriteBatchImplm_impl_batch
DataStream ssKey {}
DataStream ssValue {}

Friends

class CDBWrapper

Detailed Description

Batch of changes queued to be written to a CDBWrapper.

Definition at line 71 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:
Here is the caller graph for this function:

◆ ~CDBBatch()

CDBBatch::~CDBBatch ( )
default

Member Function Documentation

◆ ApproximateSize()

size_t CDBBatch::ApproximateSize ( ) const

Definition at line 189 of file dbwrapper.cpp.

Here is the caller graph for this function:

◆ Clear()

void CDBBatch::Clear ( )

Definition at line 170 of file dbwrapper.cpp.

Here is the caller graph for this function:

◆ Erase()

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

Definition at line 108 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 183 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 96 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 & ssValue )
private

Definition at line 175 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 73 of file dbwrapper.h.

Member Data Documentation

◆ m_impl_batch

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

Definition at line 79 of file dbwrapper.h.

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 76 of file dbwrapper.h.

◆ ssKey

DataStream CDBBatch::ssKey {}
private

Definition at line 81 of file dbwrapper.h.

◆ ssValue

DataStream CDBBatch::ssValue {}
private

Definition at line 82 of file dbwrapper.h.


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