Kyoto Cabinet
|
Interface of cursor to indicate a record. More...
#include <kcdb.h>
Public Member Functions | |
virtual | ~Cursor () |
Destructor. | |
bool | set_value (const char *vbuf, size_t vsiz, bool step=false) |
Set the value of the current record. | |
bool | set_value_str (const std::string &value, bool step=false) |
Set the value of the current record. | |
bool | remove () |
Remove the current record. | |
char * | get_key (size_t *sp, bool step=false) |
Get the key of the current record. | |
bool | get_key (std::string *key, bool step=false) |
Get the key of the current record. | |
char * | get_value (size_t *sp, bool step=false) |
Get the value of the current record. | |
bool | get_value (std::string *value, bool step=false) |
Get the value of the current record. | |
char * | get (size_t *ksp, const char **vbp, size_t *vsp, bool step=false) |
Get a pair of the key and the value of the current record. | |
bool | get (std::string *key, std::string *value, bool step=false) |
Get a pair of the key and the value of the current record. | |
char * | seize (size_t *ksp, const char **vbp, size_t *vsp) |
Get a pair of the key and the value of the current record and remove it atomically. | |
bool | seize (std::string *key, std::string *value) |
Get a pair of the key and the value of the current record and remove it atomically. | |
virtual BasicDB * | db ()=0 |
Get the database object. | |
Error | error () |
Get the last happened error. |
Interface of cursor to indicate a record.
virtual kyotocabinet::BasicDB::Cursor::~Cursor | ( | ) | [virtual] |
Destructor.
Reimplemented from kyotocabinet::DB::Cursor.
Reimplemented in kyotocabinet::HashDB::Cursor, kyotocabinet::PlantDB< BASEDB, DBTYPE >::Cursor, kyotocabinet::DirDB::Cursor, kyotocabinet::CacheDB::Cursor, kyotocabinet::StashDB::Cursor, kyotocabinet::ProtoDB< STRMAP, DBTYPE >::Cursor, kyotocabinet::PolyDB::Cursor, and kyotocabinet::TextDB::Cursor.
bool kyotocabinet::BasicDB::Cursor::set_value | ( | const char * | vbuf, |
size_t | vsiz, | ||
bool | step = false |
||
) | [virtual] |
Set the value of the current record.
vbuf | the pointer to the value region. |
vsiz | the size of the value region. |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::set_value_str | ( | const std::string & | value, |
bool | step = false |
||
) | [virtual] |
Set the value of the current record.
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::remove | ( | ) | [virtual] |
Remove the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get_key | ( | size_t * | sp, |
bool | step = false |
||
) | [virtual] |
Get the key of the current record.
sp | the pointer to the variable into which the size of the region of the return value is assigned. |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::get_key | ( | std::string * | key, |
bool | step = false |
||
) | [virtual] |
Get the key of the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get_value | ( | size_t * | sp, |
bool | step = false |
||
) | [virtual] |
Get the value of the current record.
sp | the pointer to the variable into which the size of the region of the return value is assigned. |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::get_value | ( | std::string * | value, |
bool | step = false |
||
) | [virtual] |
Get the value of the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get | ( | size_t * | ksp, |
const char ** | vbp, | ||
size_t * | vsp, | ||
bool | step = false |
||
) | [virtual] |
Get a pair of the key and the value of the current record.
ksp | the pointer to the variable into which the size of the region of the return value is assigned. |
vbp | the pointer to the variable into which the pointer to the value region is assigned. |
vsp | the pointer to the variable into which the size of the value region is assigned. |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::get | ( | std::string * | key, |
std::string * | value, | ||
bool | step = false |
||
) | [virtual] |
Get a pair of the key and the value of the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::seize | ( | size_t * | ksp, |
const char ** | vbp, | ||
size_t * | vsp | ||
) |
Get a pair of the key and the value of the current record and remove it atomically.
ksp | the pointer to the variable into which the size of the region of the return value is assigned. |
vbp | the pointer to the variable into which the pointer to the value region is assigned. |
vsp | the pointer to the variable into which the size of the value region is assigned. |
bool kyotocabinet::BasicDB::Cursor::seize | ( | std::string * | key, |
std::string * | value | ||
) |
Get a pair of the key and the value of the current record and remove it atomically.
virtual BasicDB* kyotocabinet::BasicDB::Cursor::db | ( | ) | [pure virtual] |
Get the database object.
Implements kyotocabinet::DB::Cursor.
Implemented in kyotocabinet::HashDB::Cursor, kyotocabinet::PlantDB< BASEDB, DBTYPE >::Cursor, kyotocabinet::DirDB::Cursor, kyotocabinet::CacheDB::Cursor, kyotocabinet::ProtoDB< STRMAP, DBTYPE >::Cursor, kyotocabinet::StashDB::Cursor, kyotocabinet::TextDB::Cursor, and kyotocabinet::PolyDB::Cursor.
Get the last happened error.