RAII class that provides access to a Berkeley database.
More...
#include <db.h>
|
| BerkeleyBatch (BerkeleyDatabase &database, const char *pszMode="r+", bool fFlushOnCloseIn=true) |
|
| ~BerkeleyBatch () |
|
| BerkeleyBatch (const BerkeleyBatch &)=delete |
|
BerkeleyBatch & | operator= (const BerkeleyBatch &)=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 fs::path &file_path, void *callbackDataIn, bool(*recoverKVcallback)(void *callbackData, CDataStream ssKey, CDataStream ssValue), std::string &out_backup_filename) |
|
static bool | PeriodicFlush (BerkeleyDatabase &database) |
|
static bool | VerifyEnvironment (const fs::path &file_path, std::string &errorStr) |
|
static bool | VerifyDatabaseFile (const fs::path &file_path, std::string &warningStr, std::string &errorStr, BerkeleyEnvironment::recoverFunc_type recoverFunc) |
|
static bool | Rewrite (BerkeleyDatabase &database, const char *pszSkip=nullptr) |
|
RAII class that provides access to a Berkeley database.
Definition at line 178 of file db.h.
◆ BerkeleyBatch() [1/2]
BerkeleyBatch::BerkeleyBatch |
( |
BerkeleyDatabase & |
database, |
|
|
const char * |
pszMode = "r+" , |
|
|
bool |
fFlushOnCloseIn = true |
|
) |
| |
|
explicit |
◆ ~BerkeleyBatch()
BerkeleyBatch::~BerkeleyBatch |
( |
| ) |
|
|
inline |
Definition at line 190 of file db.h.
◆ BerkeleyBatch() [2/2]
◆ Close()
void BerkeleyBatch::Close |
( |
| ) |
|
◆ Erase()
template<typename K >
bool BerkeleyBatch::Erase |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 273 of file db.h.
◆ Exists()
template<typename K >
bool BerkeleyBatch::Exists |
( |
const K & |
key | ) |
|
|
inline |
Definition at line 295 of file db.h.
◆ Flush()
void BerkeleyBatch::Flush |
( |
| ) |
|
◆ GetCursor()
Dbc* BerkeleyBatch::GetCursor |
( |
| ) |
|
|
inline |
Definition at line 314 of file db.h.
◆ operator=()
◆ PeriodicFlush()
◆ Read()
template<typename K , typename T >
bool BerkeleyBatch::Read |
( |
const K & |
key, |
|
|
T & |
value |
|
) |
| |
|
inline |
Definition at line 209 of file db.h.
◆ ReadAtCursor()
int BerkeleyBatch::ReadAtCursor |
( |
Dbc * |
pcursor, |
|
|
CDataStream & |
ssKey, |
|
|
CDataStream & |
ssValue, |
|
|
bool |
setRange = false |
|
) |
| |
|
inline |
Definition at line 325 of file db.h.
◆ ReadVersion()
bool BerkeleyBatch::ReadVersion |
( |
int & |
nVersion | ) |
|
|
inline |
Definition at line 390 of file db.h.
◆ Recover()
bool BerkeleyBatch::Recover |
( |
const fs::path & |
file_path, |
|
|
void * |
callbackDataIn, |
|
|
bool(*)(void *callbackData, CDataStream ssKey, CDataStream ssValue) |
recoverKVcallback, |
|
|
std::string & |
out_backup_filename |
|
) |
| |
|
static |
◆ Rewrite()
bool BerkeleyBatch::Rewrite |
( |
BerkeleyDatabase & |
database, |
|
|
const char * |
pszSkip = nullptr |
|
) |
| |
|
static |
◆ TxnAbort()
bool BerkeleyBatch::TxnAbort |
( |
| ) |
|
|
inline |
Definition at line 381 of file db.h.
◆ TxnBegin()
bool BerkeleyBatch::TxnBegin |
( |
| ) |
|
|
inline |
Definition at line 361 of file db.h.
◆ TxnCommit()
bool BerkeleyBatch::TxnCommit |
( |
| ) |
|
|
inline |
Definition at line 372 of file db.h.
◆ VerifyDatabaseFile()
◆ VerifyEnvironment()
bool BerkeleyBatch::VerifyEnvironment |
( |
const fs::path & |
file_path, |
|
|
std::string & |
errorStr |
|
) |
| |
|
static |
◆ Write()
template<typename K , typename T >
bool BerkeleyBatch::Write |
( |
const K & |
key, |
|
|
const T & |
value, |
|
|
bool |
fOverwrite = true |
|
) |
| |
|
inline |
Definition at line 244 of file db.h.
◆ WriteVersion()
bool BerkeleyBatch::WriteVersion |
( |
int |
nVersion | ) |
|
|
inline |
Definition at line 396 of file db.h.
◆ activeTxn
DbTxn* BerkeleyBatch::activeTxn |
|
protected |
Definition at line 183 of file db.h.
◆ env
Definition at line 186 of file db.h.
◆ fFlushOnClose
bool BerkeleyBatch::fFlushOnClose |
|
protected |
Definition at line 185 of file db.h.
◆ fReadOnly
bool BerkeleyBatch::fReadOnly |
|
protected |
Definition at line 184 of file db.h.
◆ pdb
Definition at line 181 of file db.h.
◆ strFile
std::string BerkeleyBatch::strFile |
|
protected |
Definition at line 182 of file db.h.
The documentation for this class was generated from the following files: