upscaledb
2.2.1
|
#include <upscaledb.hpp>
Public Member Functions | |
cursor (db *db=0, txn *t=0, uint32_t flags=0) | |
cursor (txn *t, db *db=0, uint32_t flags=0) | |
~cursor () | |
void | create (db *db, txn *t=0, uint32_t flags=0) |
cursor | clone () |
void | move (key *k, record *r, uint32_t flags=0) |
void | move_first (key *k=0, record *r=0) |
void | move_last (key *k=0, record *r=0) |
void | move_next (key *k=0, record *r=0) |
void | move_previous (key *k=0, record *r=0) |
void | overwrite (record *r, uint32_t flags=0) |
void | find (key *k, record *r=0, uint32_t flags=0) |
void | insert (key *k, record *r, uint32_t flags=0) |
void | erase (uint32_t flags=0) |
uint32_t | get_duplicate_count (uint32_t flags=0) |
uint32_t | get_record_size () |
void | close () |
Protected Member Functions | |
cursor (ups_cursor_t *c) | |
Private Attributes | |
ups_cursor_t * | _cursor |
A Database Cursor.
This class wraps the ups_cursor_t Cursor handles.
Definition at line 436 of file upscaledb.hpp.
Constructor
Definition at line 439 of file upscaledb.hpp.
Constructor
Definition at line 445 of file upscaledb.hpp.
|
inline |
Destructor - automatically closes the Cursor, if necessary.
!! Any exception is silently discarded. Use of the destructor to close cursors is therefore not recommended, because there are valid reasons why an Exception can be thrown.
An assert() was added to catch this condition in debug builds.
Definition at line 460 of file upscaledb.hpp.
References upscaledb::error::get_errno().
|
inlineprotected |
Definition at line 579 of file upscaledb.hpp.
|
inline |
Clones the Cursor.
Definition at line 482 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_cursor_clone().
|
inline |
Closes the Cursor.
Definition at line 568 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_cursor_close().
Creates a new Cursor.
Definition at line 470 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::db::get_handle(), and ups_cursor_create().
|
inline |
Erases the current key/record pair.
Definition at line 543 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_cursor_erase().
Finds a key.
Definition at line 527 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), and ups_cursor_find().
Referenced by run_demo().
Returns the number of duplicate keys.
Definition at line 550 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_cursor_get_duplicate_count().
|
inline |
Returns the size of the current record.
Definition at line 559 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_cursor_get_record_size().
Inserts a key/record pair.
Definition at line 535 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), and ups_cursor_insert().
Moves the Cursor, and retrieves the key/record of the new position.
Definition at line 491 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), and ups_cursor_move().
Referenced by run_demo().
Moves the Cursor to the first Database element.
Definition at line 499 of file upscaledb.hpp.
References UPS_CURSOR_FIRST.
Moves the Cursor to the last Database element.
Definition at line 504 of file upscaledb.hpp.
References UPS_CURSOR_LAST.
Moves the Cursor to the next Database element.
Definition at line 509 of file upscaledb.hpp.
References UPS_CURSOR_NEXT.
Referenced by run_demo().
Moves the Cursor to the previous Database element.
Definition at line 514 of file upscaledb.hpp.
References UPS_CURSOR_PREVIOUS.
Overwrites the current record.
Definition at line 519 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::record::get_handle(), and ups_cursor_overwrite().
|
private |
Definition at line 584 of file upscaledb.hpp.