Interface to the create,destroy the key value store database.
More...
#include <databaseInterface.hpp>
|
virtual | ~DatabaseInterface () |
| Destructor. More...
|
|
virtual bool | exists (const std::string &configsource) const =0 |
| Evaluate if the database specified exists. More...
|
|
virtual DatabaseClientInterface * | createClient (const std::string &configsource) const =0 |
| Creates a client to access the key value store database. More...
|
|
virtual bool | createDatabase (const std::string &configsource) const =0 |
| Creates a new key value store database described with config. More...
|
|
virtual bool | restoreDatabase (const std::string &configsource, DatabaseBackupCursorInterface *backup) const =0 |
| Restore a database at the location described in config and restore the backup from the backup interface passed. More...
|
|
virtual bool | destroyDatabase (const std::string &configsource) const =0 |
| Destroys an existing key value store database described with config. More...
|
|
virtual const char * | getConfigDescription (const ConfigType &type) const =0 |
| Gets an example configuration description (source string as used by the functions here) createDatabase(const char*), destroyDatabase(const char*) and createDatabaseClient(const char*) for the usage printed by programs using this database. More...
|
|
virtual const char ** | getConfigParameters (const ConfigType &type) const =0 |
| Get the list of known configuration parameter keys for verification of the configuration by programs using this database. More...
|
|
Interface to the create,destroy the key value store database.
Enumeration of different type of configurations Needed for getting the correct description of the configuration.
Enumerator |
---|
CmdCreateClient |
Config description for the creation of an instance accessing the repository.
|
CmdCreate |
Config description for the creation of a repository that does not exist yet.
|
CmdDestroy |
Config description for the physical disposal of a repository.
|
virtual strus::DatabaseInterface::~DatabaseInterface |
( |
| ) |
|
|
inlinevirtual |
Creates a client to access the key value store database.
- Parameters
-
[in] | configsource | configuration source string describing the database (not a filename !) |
- Returns
- the client on success or NULL, if the operation failed
virtual bool strus::DatabaseInterface::createDatabase |
( |
const std::string & |
configsource | ) |
const |
|
pure virtual |
Creates a new key value store database described with config.
- Parameters
-
[in] | configsource | configuration source string describing the database (not a filename !) |
- Returns
- true, if the operation succeeded
virtual bool strus::DatabaseInterface::destroyDatabase |
( |
const std::string & |
configsource | ) |
const |
|
pure virtual |
Destroys an existing key value store database described with config.
- Parameters
-
[in] | configsource | configuration source string describing the key value store database (not a filename !) |
- Returns
- true, if the operation succeeded
virtual bool strus::DatabaseInterface::exists |
( |
const std::string & |
configsource | ) |
const |
|
pure virtual |
Evaluate if the database specified exists.
- Parameters
-
[in] | configsource | configuration source string describing the database (not a filename !) |
virtual const char* strus::DatabaseInterface::getConfigDescription |
( |
const ConfigType & |
type | ) |
const |
|
pure virtual |
Gets an example configuration description (source string as used by the functions here) createDatabase(const char*), destroyDatabase(const char*) and createDatabaseClient(const char*) for the usage printed by programs using this database.
virtual const char** strus::DatabaseInterface::getConfigParameters |
( |
const ConfigType & |
type | ) |
const |
|
pure virtual |
Get the list of known configuration parameter keys for verification of the configuration by programs using this database.
Restore a database at the location described in config and restore the backup from the backup interface passed.
- Parameters
-
[in] | configsource | configuration source string describing location of the database restored (not a filename !) |
[in] | backup | interface to backup to restore |
- Returns
- true, if the operation succeeded
The documentation for this class was generated from the following file: