Interface for transactions for writing on the strus key value storage database.
More...
#include <databaseTransactionInterface.hpp>
|
virtual | ~DatabaseTransactionInterface () |
| Destructor. More...
|
|
virtual DatabaseCursorInterface * | createCursor (const DatabaseOptions &options) const =0 |
| Get an interface for reading values in the context of this transaction. More...
|
|
virtual void | write (const char *key, std::size_t keysize, const char *value, std::size_t valuesize)=0 |
| Define a key/value pair to be written to the database as part of this transaction. More...
|
|
virtual void | remove (const char *key, std::size_t keysize)=0 |
| Define a key to be deleted in the database as part of this transaction. More...
|
|
virtual void | removeSubTree (const char *domainkey, std::size_t domainkeysize)=0 |
| Define a set of nodes defined by a key prefix to be deleted in the database as part of this transaction. More...
|
|
virtual bool | commit ()=0 |
| Executes all commands defined in the transaction or none if one operation fails. More...
|
|
virtual void | rollback ()=0 |
| Rollback of the transaction, no changes made. More...
|
|
Interface for transactions for writing on the strus key value storage database.
virtual strus::DatabaseTransactionInterface::~DatabaseTransactionInterface |
( |
| ) |
|
|
inlinevirtual |
virtual bool strus::DatabaseTransactionInterface::commit |
( |
| ) |
|
|
pure virtual |
Executes all commands defined in the transaction or none if one operation fails.
Get an interface for reading values in the context of this transaction.
- Parameters
-
[in] | options | some hints how to access the key/value elements or blocks (e.g. fill LRU cache of not) |
- Returns
- the created cursor interface to be disposed with delete by the caller
virtual void strus::DatabaseTransactionInterface::remove |
( |
const char * |
key, |
|
|
std::size_t |
keysize |
|
) |
| |
|
pure virtual |
Define a key to be deleted in the database as part of this transaction.
- Parameters
-
[in] | key | pointer to the key to delete |
[in] | keysize | size of 'key' in bytes |
virtual void strus::DatabaseTransactionInterface::removeSubTree |
( |
const char * |
domainkey, |
|
|
std::size_t |
domainkeysize |
|
) |
| |
|
pure virtual |
Define a set of nodes defined by a key prefix to be deleted in the database as part of this transaction.
- Parameters
-
[in] | domainkey | pointer to the key prefix to delete |
[in] | domainkeysize | size of 'domainkey' in bytes |
virtual void strus::DatabaseTransactionInterface::rollback |
( |
| ) |
|
|
pure virtual |
Rollback of the transaction, no changes made.
virtual void strus::DatabaseTransactionInterface::write |
( |
const char * |
key, |
|
|
std::size_t |
keysize, |
|
|
const char * |
value, |
|
|
std::size_t |
valuesize |
|
) |
| |
|
pure virtual |
Define a key/value pair to be written to the database as part of this transaction.
- Parameters
-
[in] | key | pointer to the key to write |
[in] | keysize | size of 'key' in bytes |
[in] | value | pointer to the value to write |
[in] | valuesize | size of 'value' in bytes |
- Note
- Will replace existing duplicate entry in the database (not issuing an error)
The documentation for this class was generated from the following file: