RAII class that provides access to a Berkeley database.
More...
#include <db.h>
|
| static bool | Rewrite (const std::string &strFile, const char *pszSkip=NULL) |
| |
|
| | CDB (const std::string &strFilename, const char *pszMode="r+", bool fFlushOnCloseIn=true) |
| |
| | ~CDB () |
| |
| 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, unsigned int fFlags=DB_NEXT) |
| |
RAII class that provides access to a Berkeley database.
Definition at line 95 of file db.h.
◆ CDB() [1/2]
| CDB::CDB |
( |
const std::string & |
strFilename, |
|
|
const char * |
pszMode = "r+", |
|
|
bool |
fFlushOnCloseIn = true |
|
) |
| |
|
explicitprotected |
◆ ~CDB()
Definition at line 105 of file db.h.
◆ CDB() [2/2]
◆ Close()
◆ Erase()
template<typename K >
| bool CDB::Erase |
( |
const K & |
key | ) |
|
|
inlineprotected |
Definition at line 181 of file db.h.
◆ Exists()
template<typename K >
| bool CDB::Exists |
( |
const K & |
key | ) |
|
|
inlineprotected |
Definition at line 203 of file db.h.
◆ Flush()
◆ GetCursor()
Definition at line 222 of file db.h.
◆ operator=()
| void CDB::operator= |
( |
const CDB & |
| ) |
|
|
private |
◆ Read()
template<typename K , typename T >
| bool CDB::Read |
( |
const K & |
key, |
|
|
T & |
value |
|
) |
| |
|
inlineprotected |
Definition at line 117 of file db.h.
◆ ReadAtCursor()
| int CDB::ReadAtCursor |
( |
Dbc * |
pcursor, |
|
|
CDataStream & |
ssKey, |
|
|
CDataStream & |
ssValue, |
|
|
unsigned int |
fFlags = DB_NEXT |
|
) |
| |
|
inlineprotected |
Definition at line 233 of file db.h.
◆ ReadVersion()
| bool CDB::ReadVersion |
( |
int & |
nVersion | ) |
|
|
inline |
Definition at line 314 of file db.h.
◆ Rewrite()
| bool CDB::Rewrite |
( |
const std::string & |
strFile, |
|
|
const char * |
pszSkip = NULL |
|
) |
| |
|
static |
◆ TxnAbort()
Definition at line 305 of file db.h.
◆ TxnBegin()
Definition at line 285 of file db.h.
◆ TxnCommit()
Definition at line 296 of file db.h.
◆ Write()
template<typename K , typename T >
| bool CDB::Write |
( |
const K & |
key, |
|
|
const T & |
value, |
|
|
bool |
fOverwrite = true |
|
) |
| |
|
inlineprotected |
Definition at line 152 of file db.h.
◆ WriteVersion()
| bool CDB::WriteVersion |
( |
int |
nVersion | ) |
|
|
inline |
Definition at line 320 of file db.h.
◆ activeTxn
Definition at line 100 of file db.h.
◆ fFlushOnClose
Definition at line 102 of file db.h.
◆ fReadOnly
Definition at line 101 of file db.h.
◆ pdb
Definition at line 98 of file db.h.
◆ strFile
Definition at line 99 of file db.h.
The documentation for this class was generated from the following files: