RAII class that provides access to a Berkeley database.
More...
#include <db.h>
|
| CDB (CWalletDBWrapper &dbw, const char *pszMode="r+", bool fFlushOnCloseIn=true) |
|
| ~CDB () |
|
| CDB (const CDB &)=delete |
|
CDB & | operator= (const CDB &)=delete |
|
void | Flush () |
|
void | Close () |
|
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) |
|
Dbc * | GetCursor () |
|
int | ReadAtCursor (Dbc *pcursor, CDataStream &ssKey, CDataStream &ssValue, bool setRange=false) |
|
bool | TxnBegin () |
|
bool | TxnCommit () |
|
bool | TxnAbort () |
|
bool | ReadVersion (int &nVersion) |
|
bool | WriteVersion (int nVersion) |
|
|
static bool | Recover (const std::string &filename, void *callbackDataIn, bool(*recoverKVcallback)(void *callbackData, CDataStream ssKey, CDataStream ssValue), std::string &out_backup_filename) |
|
static bool | PeriodicFlush (CWalletDBWrapper &dbw) |
|
static bool | VerifyEnvironment (const std::string &walletFile, const fs::path &dataDir, std::string &errorStr) |
|
static bool | VerifyDatabaseFile (const std::string &walletFile, const fs::path &dataDir, std::string &warningStr, std::string &errorStr, CDBEnv::recoverFunc_type recoverFunc) |
|
static bool | Rewrite (CWalletDBWrapper &dbw, const char *pszSkip=nullptr) |
|
RAII class that provides access to a Berkeley database.
Definition at line 146 of file db.h.
◆ CDB() [1/2]
CDB::CDB |
( |
CWalletDBWrapper & |
dbw, |
|
|
const char * |
pszMode = "r+" , |
|
|
bool |
fFlushOnCloseIn = true |
|
) |
| |
|
explicit |
◆ ~CDB()
Definition at line 158 of file db.h.
◆ CDB() [2/2]
◆ Close()
◆ Erase()
template<typename K >
bool CDB::Erase |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 241 of file db.h.
◆ Exists()
template<typename K >
bool CDB::Exists |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 263 of file db.h.
◆ Flush()
◆ GetCursor()
Definition at line 282 of file db.h.
◆ operator=()
CDB& CDB::operator= |
( |
const CDB & |
| ) |
|
|
delete |
◆ PeriodicFlush()
◆ Read()
template<typename K , typename T >
bool CDB::Read |
( |
const K & |
key, |
|
|
T & |
value |
|
) |
| |
|
inline |
Definition at line 177 of file db.h.
◆ ReadAtCursor()
Definition at line 293 of file db.h.
◆ ReadVersion()
bool CDB::ReadVersion |
( |
int & |
nVersion | ) |
|
|
inline |
Definition at line 358 of file db.h.
◆ Recover()
bool CDB::Recover |
( |
const std::string & |
filename, |
|
|
void * |
callbackDataIn, |
|
|
bool(*)(void *callbackData, CDataStream ssKey, CDataStream ssValue) |
recoverKVcallback, |
|
|
std::string & |
out_backup_filename |
|
) |
| |
|
static |
◆ Rewrite()
◆ TxnAbort()
Definition at line 349 of file db.h.
◆ TxnBegin()
Definition at line 329 of file db.h.
◆ TxnCommit()
Definition at line 340 of file db.h.
◆ VerifyDatabaseFile()
bool CDB::VerifyDatabaseFile |
( |
const std::string & |
walletFile, |
|
|
const fs::path & |
dataDir, |
|
|
std::string & |
warningStr, |
|
|
std::string & |
errorStr, |
|
|
CDBEnv::recoverFunc_type |
recoverFunc |
|
) |
| |
|
static |
◆ VerifyEnvironment()
bool CDB::VerifyEnvironment |
( |
const std::string & |
walletFile, |
|
|
const fs::path & |
dataDir, |
|
|
std::string & |
errorStr |
|
) |
| |
|
static |
◆ Write()
template<typename K , typename T >
bool CDB::Write |
( |
const K & |
key, |
|
|
const T & |
value, |
|
|
bool |
fOverwrite = true |
|
) |
| |
|
inline |
Definition at line 212 of file db.h.
◆ WriteVersion()
bool CDB::WriteVersion |
( |
int |
nVersion | ) |
|
|
inline |
Definition at line 364 of file db.h.
◆ activeTxn
Definition at line 151 of file db.h.
◆ env
Definition at line 154 of file db.h.
◆ fFlushOnClose
Definition at line 153 of file db.h.
◆ fReadOnly
Definition at line 152 of file db.h.
◆ pdb
Definition at line 149 of file db.h.
◆ strFile
Definition at line 150 of file db.h.
The documentation for this class was generated from the following files: