#include <kvstore.hpp>
|
class | Transaction |
| A guard struct for thread synchronization and transaction management. More...
|
|
|
typedef std::lock_guard
< std::recursive_mutex > | Lock |
|
cargo::KVStore::KVStore |
( |
const std::string & |
path | ) |
|
|
explicit |
- Parameters
-
path | configuration database file path |
cargo::KVStore::~KVStore |
( |
| ) |
|
cargo::KVStore::KVStore |
( |
const KVStore & |
| ) |
|
|
delete |
void cargo::KVStore::clear |
( |
| ) |
|
Clears all the stored data.
void cargo::KVStore::createFunctions |
( |
| ) |
|
|
private |
bool cargo::KVStore::exists |
( |
const std::string & |
key | ) |
|
- Parameters
-
key | string of the stored value |
- Returns
- Does this key exist in the database
std::string cargo::KVStore::get |
( |
const std::string & |
key | ) |
|
Gets the value corresponding to the key.
- Parameters
-
key | string key of the value |
- Returns
- value corresponding to the key
std::vector< std::string > cargo::KVStore::getKeys |
( |
| ) |
|
bool cargo::KVStore::isEmpty |
( |
| ) |
|
- Returns
- Is there any data stored
bool cargo::KVStore::prefixExists |
( |
const std::string & |
key | ) |
|
- Parameters
-
key | string of the stored value |
- Returns
- Does a key starting with an argument exist in the database
void cargo::KVStore::prepareStatements |
( |
| ) |
|
|
private |
void cargo::KVStore::remove |
( |
const std::string & |
key | ) |
|
Removes values corresponding to the passed key.
Many values may correspond to one key, so many values may need to be deleted
- Parameters
-
key | string regexp of the stored values |
void cargo::KVStore::set |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Stores a single value corresponding to the passed key.
- Parameters
-
key | string key of the value |
value | value corresponding to the key |
void cargo::KVStore::setupDb |
( |
| ) |
|
|
private |
bool cargo::KVStore::mIsTransactionCommited |
|
private |
std::recursive_mutex cargo::KVStore::mMutex |
|
private |
std::string cargo::KVStore::mPath |
|
private |
size_t cargo::KVStore::mTransactionDepth |
|
private |
The documentation for this class was generated from the following files: