Hydra 0.20
|
#include <DB.h>
Public Member Functions | |
Cursor (hydra::DB &db) | |
Cursor (hydra::DB &db, const QString &prefix) | |
bool | isValid (void) const |
bool | next (void) |
const char * | getKey (void) |
void | get (std::string &value) |
void | get (QString &value) |
bool | get (hydra::Record &value) |
A iterator though a DB.
hydra::Cursor::Cursor | ( | hydra::DB & | db | ) |
hydra::Cursor::Cursor | ( | hydra::DB & | db, |
const QString & | prefix | ||
) |
void hydra::Cursor::get | ( | std::string & | value | ) |
Loads the current value. The current row must be valid.
void hydra::Cursor::get | ( | QString & | value | ) |
Loads the current value. The current row must be valid.
bool hydra::Cursor::get | ( | hydra::Record & | value | ) |
Loads the current value. The current row must be valid.
Returns false if the record failed to deserialize (ie. it threw an exception)
const char* hydra::Cursor::getKey | ( | void | ) |
Returns the key value at the current row. The current row must be valid.
bool hydra::Cursor::isValid | ( | void | ) | const [inline] |
Is the cursot at a valid row?
bool hydra::Cursor::next | ( | void | ) |
Move the cursor to the next row, returns true if this was successul and the cursor is at the next row and is valid.