RAII class that provides access to a Berkeley database.
More...
#include <db.h>
|
| CDB (CWalletDBWrapper &dbw, const char *pszMode="r+", bool fFlushOnCloseIn=true) |
|
| ~CDB () |
|
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 145 of file db.h.
CDB::CDB |
( |
CWalletDBWrapper & |
dbw, |
|
|
const char * |
pszMode = "r+" , |
|
|
bool |
fFlushOnCloseIn = true |
|
) |
| |
|
explicit |
Definition at line 157 of file db.h.
template<typename K >
bool CDB::Erase |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 241 of file db.h.
template<typename K >
bool CDB::Exists |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 263 of file db.h.
Definition at line 282 of file db.h.
void CDB::operator= |
( |
const CDB & |
| ) |
|
|
private |
template<typename K , typename T >
bool CDB::Read |
( |
const K & |
key, |
|
|
T & |
value |
|
) |
| |
|
inline |
Definition at line 177 of file db.h.
Definition at line 293 of file db.h.
bool CDB::ReadVersion |
( |
int & |
nVersion | ) |
|
|
inline |
Definition at line 358 of file db.h.
bool CDB::Recover |
( |
const std::string & |
filename, |
|
|
void * |
callbackDataIn, |
|
|
bool(*)(void *callbackData, CDataStream ssKey, CDataStream ssValue) |
recoverKVcallback, |
|
|
std::string & |
out_backup_filename |
|
) |
| |
|
static |
Definition at line 349 of file db.h.
Definition at line 329 of file db.h.
Definition at line 340 of file db.h.
bool CDB::VerifyDatabaseFile |
( |
const std::string & |
walletFile, |
|
|
const fs::path & |
dataDir, |
|
|
std::string & |
warningStr, |
|
|
std::string & |
errorStr, |
|
|
CDBEnv::recoverFunc_type |
recoverFunc |
|
) |
| |
|
static |
bool CDB::VerifyEnvironment |
( |
const std::string & |
walletFile, |
|
|
const fs::path & |
dataDir, |
|
|
std::string & |
errorStr |
|
) |
| |
|
static |
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.
bool CDB::WriteVersion |
( |
int |
nVersion | ) |
|
|
inline |
Definition at line 364 of file db.h.
Definition at line 150 of file db.h.
Definition at line 153 of file db.h.
Definition at line 152 of file db.h.
Definition at line 151 of file db.h.
Definition at line 148 of file db.h.
Definition at line 149 of file db.h.
The documentation for this class was generated from the following files: