Bitcoin
Public Member Functions | Private Attributes | Friends | List of all members
CDBBatch Class Reference

#include <dbwrapper.h>

Public Member Functions

 CDBBatch (const CDBWrapper &_parent)
 
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 SizeEstimate () const
 

Private Attributes

const CDBWrapperparent
 
leveldb::WriteBatch batch
 
CDataStream ssKey
 
CDataStream ssValue
 
size_t size_estimate
 

Friends

class CDBWrapper
 

Detailed Description

Batch of changes queued to be written to a CDBWrapper

Constructor & Destructor Documentation

◆ CDBBatch()

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

Member Function Documentation

◆ Clear()

void CDBBatch::Clear ( )
inline

◆ Erase()

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

◆ SizeEstimate()

size_t CDBBatch::SizeEstimate ( ) const
inline

◆ Write()

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

Friends And Related Function Documentation

◆ CDBWrapper

friend class CDBWrapper
friend

Member Data Documentation

◆ batch

leveldb::WriteBatch CDBBatch::batch
private

◆ parent

const CDBWrapper& CDBBatch::parent
private

◆ size_estimate

size_t CDBBatch::size_estimate
private

◆ ssKey

CDataStream CDBBatch::ssKey
private

◆ ssValue

CDataStream CDBBatch::ssValue
private

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