Bitcoin ABC 0.30.7
P2P Digital Currency
|
RAII class that provides access to a Berkeley database. More...
#include <bdb.h>
Classes | |
class | SafeDbt |
RAII class that automatically cleanses its data on destruction. More... | |
Public Member Functions | |
BerkeleyBatch (BerkeleyDatabase &database, const bool fReadOnly, bool fFlushOnCloseIn=true) | |
~BerkeleyBatch () override | |
BerkeleyBatch (const BerkeleyBatch &)=delete | |
BerkeleyBatch & | operator= (const BerkeleyBatch &)=delete |
void | Flush () override |
void | Close () override |
bool | StartCursor () override |
bool | ReadAtCursor (CDataStream &ssKey, CDataStream &ssValue, bool &complete) override |
void | CloseCursor () override |
bool | TxnBegin () override |
bool | TxnCommit () override |
bool | TxnAbort () override |
Public Member Functions inherited from DatabaseBatch | |
DatabaseBatch () | |
virtual | ~DatabaseBatch () |
DatabaseBatch (const DatabaseBatch &)=delete | |
DatabaseBatch & | operator= (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 |
Protected Attributes | |
Db * | pdb |
std::string | strFile |
DbTxn * | activeTxn |
Dbc * | m_cursor |
bool | fReadOnly |
bool | fFlushOnClose |
BerkeleyEnvironment * | env |
BerkeleyDatabase & | m_database |
Private Member Functions | |
bool | ReadKey (CDataStream &&key, CDataStream &value) override |
bool | WriteKey (CDataStream &&key, CDataStream &&value, bool overwrite=true) override |
bool | EraseKey (CDataStream &&key) override |
bool | HasKey (CDataStream &&key) override |
|
explicit |
|
override |
|
delete |
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 436 of file bdb.cpp.
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 776 of file bdb.cpp.
|
overrideprivatevirtual |
Implements DatabaseBatch.
Definition at line 853 of file bdb.cpp.
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 405 of file bdb.cpp.
|
overrideprivatevirtual |
Implements DatabaseBatch.
|
delete |
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 747 of file bdb.cpp.
|
overrideprivatevirtual |
Implements DatabaseBatch.
Definition at line 818 of file bdb.cpp.
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 738 of file bdb.cpp.
|
overridevirtual |
Implements DatabaseBatch.
|
overridevirtual |
Implements DatabaseBatch.
Definition at line 784 of file bdb.cpp.
|
overridevirtual |
Implements DatabaseBatch.
|
overrideprivatevirtual |
Implements DatabaseBatch.
Definition at line 834 of file bdb.cpp.
|
protected |
|
protected |