Interface to database cursor.
More...
#include <databaseCursorInterface.hpp>
|
class | Slice |
| Chunk data structure without ownership for keys and values of the database cursor. More...
|
|
|
virtual | ~DatabaseCursorInterface () |
| Destructor. More...
|
|
virtual Slice | seekUpperBound (const char *keystr, std::size_t keysize, std::size_t domainkeysize)=0 |
| Move cursor to the least upper bound key stored in the database. More...
|
|
virtual Slice | seekUpperBoundRestricted (const char *keystr, std::size_t keysize, const char *upkey, std::size_t upkeysize)=0 |
| Move cursor to the least upper bound key stored in the database with upper limit specified by key and not by the domain key size. More...
|
|
virtual Slice | seekFirst (const char *domainkey, std::size_t domainkeysize)=0 |
| Move cursor to the first key stored in the database in a defined key domain. More...
|
|
virtual Slice | seekLast (const char *domainkey, std::size_t domainkeysize)=0 |
| Move cursor to the last key stored in the database in a defined key domain. More...
|
|
virtual Slice | seekNext ()=0 |
| Move cursor to the next key stored in the database in the current key domain. More...
|
|
virtual Slice | seekPrev ()=0 |
| Move cursor to the previous key stored in the database in the current key domain. More...
|
|
virtual Slice | key () const =0 |
| Get the key of the current element. More...
|
|
virtual Slice | value () const =0 |
| Get the value of the current element. More...
|
|
Interface to database cursor.
virtual strus::DatabaseCursorInterface::~DatabaseCursorInterface |
( |
| ) |
|
|
inlinevirtual |
virtual Slice strus::DatabaseCursorInterface::key |
( |
| ) |
const |
|
pure virtual |
Get the key of the current element.
- Returns
- the key of the current element or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekFirst |
( |
const char * |
domainkey, |
|
|
std::size_t |
domainkeysize |
|
) |
| |
|
pure virtual |
Move cursor to the first key stored in the database in a defined key domain.
- Parameters
-
[in] | domainkey | defines the key value domain (the subset set of keys to scan) |
[in] | domainkeysize | size of 'domainkey' in bytes |
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekLast |
( |
const char * |
domainkey, |
|
|
std::size_t |
domainkeysize |
|
) |
| |
|
pure virtual |
Move cursor to the last key stored in the database in a defined key domain.
- Parameters
-
[in] | domainkey | defines the key value domain (the subset set of keys to scan) |
[in] | domainkeysize | size of 'domainkey' in bytes |
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekNext |
( |
| ) |
|
|
pure virtual |
Move cursor to the next key stored in the database in the current key domain.
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekPrev |
( |
| ) |
|
|
pure virtual |
Move cursor to the previous key stored in the database in the current key domain.
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekUpperBound |
( |
const char * |
keystr, |
|
|
std::size_t |
keysize, |
|
|
std::size_t |
domainkeysize |
|
) |
| |
|
pure virtual |
Move cursor to the least upper bound key stored in the database.
- Parameters
-
[in] | keystr | pointer to the key of the item to seek |
[in] | keysize | size of 'key' in bytes |
[in] | domainkeysize | size of 'key' that defines the key value domain (the subset set of keys to search in) |
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::seekUpperBoundRestricted |
( |
const char * |
keystr, |
|
|
std::size_t |
keysize, |
|
|
const char * |
upkey, |
|
|
std::size_t |
upkeysize |
|
) |
| |
|
pure virtual |
Move cursor to the least upper bound key stored in the database with upper limit specified by key and not by the domain key size.
- Parameters
-
[in] | keystr | pointer to the key of the item to seek |
[in] | keysize | size of 'key' in bytes |
[in] | upkey | pointer to the upper limit key that does not belong anymore to the key domain scanned |
[in] | upkeysize | size of 'upkey' in bytes |
- Returns
- the key of the element found or an undefined key
virtual Slice strus::DatabaseCursorInterface::value |
( |
| ) |
const |
|
pure virtual |
Get the value of the current element.
- Returns
- the value of the current element or an undefined key
The documentation for this class was generated from the following file: