Interface for accessing the strus key value storage database.
More...
#include <databaseClientInterface.hpp>
Interface for accessing the strus key value storage database.
virtual strus::DatabaseClientInterface::~DatabaseClientInterface |
( |
| ) |
|
|
inlinevirtual |
virtual void strus::DatabaseClientInterface::close |
( |
| ) |
|
|
pure virtual |
Close client connection and eventually do some cleanup.
virtual bool strus::DatabaseClientInterface::compactDatabase |
( |
| ) |
|
|
pure virtual |
Compact database structures for faster read access after the first open.
- Note
- Calling this method speeds up the first open for some database implementations like LevelDB after big inserts.
virtual std::string strus::DatabaseClientInterface::config |
( |
| ) |
const |
|
pure virtual |
Get the interpreted configuration this database client was created with.
- Returns
- the configuration as string
Creates an object for iterating on a snapshot of the database that can be used for backup.
- Returns
- the created cursor interface to be disposed with delete by the caller
Create an object for reading values from and iterating on the key value store database.
- Parameters
-
[in] | options | options for the created cursor |
- Returns
- the created cursor interface to be disposed with delete by the caller
Create a transaction object for the database.
- Returns
- the created transaction interface to be disposed with delete by the caller
virtual bool strus::DatabaseClientInterface::readValue |
( |
const char * |
key, |
|
|
std::size_t |
keysize, |
|
|
std::string & |
value, |
|
|
const DatabaseOptions & |
options |
|
) |
| const |
|
pure virtual |
Read a value by key.
- Parameters
-
[in] | key | pointer to the key of the item to fetch |
[in] | keysize | size of the key of the item to fetch in bytes |
[out] | value | the value as string |
[in] | options | options as hints for the database |
- Returns
- true, if it was found
virtual void strus::DatabaseClientInterface::removeImm |
( |
const char * |
key, |
|
|
std::size_t |
keysize |
|
) |
| |
|
pure virtual |
Delete a key value stored immediately (synchronized)
- Parameters
-
[in] | key | pointer to the key of the item to write |
[in] | keysize | size of the key of the item to write in bytes |
virtual void strus::DatabaseClientInterface::writeImm |
( |
const char * |
key, |
|
|
std::size_t |
keysize, |
|
|
const char * |
value, |
|
|
std::size_t |
valuesize |
|
) |
| |
|
pure virtual |
Write a key value immediately (synchronized)
- Parameters
-
[in] | key | pointer to the key of the item to write |
[in] | keysize | size of the key of the item to write in bytes |
[in] | value | pointer to value to write |
[in] | valuesize | size of value to write in bytes |
- Note
- Replaces existing duplicate entry in the database (not issuing an error)
The documentation for this class was generated from the following file: