10 #ifndef _STRUS_DATABASE_CLIENT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_DATABASE_CLIENT_INTERFACE_HPP_INCLUDED
18 class DatabaseTransactionInterface;
20 class DatabaseCursorInterface;
22 class DatabaseBackupCursorInterface;
24 class DatabaseOptions;
57 std::size_t valuesize)=0;
64 std::size_t keysize)=0;
80 virtual std::string
config()
const=0;
89 virtual void close()=0;
virtual DatabaseCursorInterface * createCursor(const DatabaseOptions &options) const =0
Create an object for reading values from and iterating on the key value store database.
Interface to database cursor.
Definition: databaseCursorInterface.hpp:18
virtual DatabaseTransactionInterface * createTransaction()=0
Create a transaction object for the database.
Interface for accessing the strus key value storage database.
Definition: databaseClientInterface.hpp:27
virtual bool compactDatabase()=0
Compact database structures for faster read access after the first open.
virtual DatabaseBackupCursorInterface * createBackupCursor() const =0
Creates an object for iterating on a snapshot of the database that can be used for backup...
virtual void close()=0
Close client connection and eventually do some cleanup.
virtual void removeImm(const char *key, std::size_t keysize)=0
Delete a key value stored immediately (synchronized)
virtual ~DatabaseClientInterface()
Destructor.
Definition: databaseClientInterface.hpp:32
virtual std::string config() const =0
Get the interpreted configuration this database client was created with.
virtual bool readValue(const char *key, std::size_t keysize, std::string &value, const DatabaseOptions &options) const =0
Read a value by key.
virtual void writeImm(const char *key, std::size_t keysize, const char *value, std::size_t valuesize)=0
Write a key value immediately (synchronized)
Interface for transactions for writing on the strus key value storage database.
Definition: databaseTransactionInterface.hpp:22
Database cursor interface that can be used for backup.
Definition: databaseBackupCursorInterface.hpp:18
Structure for passing some options to the strus key value storage database.
Definition: databaseOptions.hpp:17