|
| Database (const DBSettings &s) |
| Create a new database connection. More...
|
|
| ~Database () |
| Clean up and free resources used by the database connection.
|
|
uint | cacheSize () |
| Get the cache size. More...
|
|
std::string | get (const leveldb::Slice &key) |
| Get the database entry for a particular key. More...
|
|
void | put (const leveldb::Slice &key, const leveldb::Slice &value) |
| Write an entry to the database. More...
|
|
void | remove (const leveldb::Slice &key) |
| Remove the entry for a particular key. More...
|
|
void | batch (leveldb::WriteBatch &batch) |
| Write to the database batched. More...
|
|
void | swap (const std::vector< std::string > &keys1, const std::vector< std::string > &keys2) |
| Swap the values for a set of keys with another. More...
|
|
stateline::db::Database::Database |
( |
const DBSettings & |
s | ) |
|
Create a new database connection.
- Parameters
-
void stateline::db::Database::batch |
( |
leveldb::WriteBatch & |
batch | ) |
|
Write to the database batched.
- Parameters
-
batch | The batched keys and values to write. |
uint stateline::db::Database::cacheSize |
( |
| ) |
|
Get the cache size.
- Returns
- The cache size in bytes.
std::string stateline::db::Database::get |
( |
const leveldb::Slice & |
key | ) |
|
Get the database entry for a particular key.
- Parameters
-
key | The key for the entry. |
- Returns
- String containing the value of the entry.
void stateline::db::Database::put |
( |
const leveldb::Slice & |
key, |
|
|
const leveldb::Slice & |
value |
|
) |
| |
Write an entry to the database.
- Parameters
-
key | The key for the entry. |
value | The value of the entry. |
void stateline::db::Database::remove |
( |
const leveldb::Slice & |
key | ) |
|
Remove the entry for a particular key.
- Parameters
-
key | The key for the entry. |
void stateline::db::Database::swap |
( |
const std::vector< std::string > & |
keys1, |
|
|
const std::vector< std::string > & |
keys2 |
|
) |
| |
Swap the values for a set of keys with another.
- Parameters
-
keys1 | The first set of keys to swap. |
keys2 | The second set of keys to swap. This must have the same length as keys1. |
The documentation for this class was generated from the following files:
- /home/lb/code/GDF/src/db/db.hpp
- /home/lb/code/GDF/src/db/db.cpp