upscaledb
2.1.13
|
#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) |
uint64_t | get_record_size () |
void | close () |
Protected Member Functions | |
cursor (ups_cursor_t *c) | |
Private Attributes | |
ups_cursor_t * | m_cursor |
A Database Cursor.
This class wraps the ups_cursor_t Cursor handles.
Definition at line 443 of file upscaledb.hpp.
Constructor
Definition at line 446 of file upscaledb.hpp.
References create().
Referenced by clone().
|
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 467 of file upscaledb.hpp.
References close(), and upscaledb::error::get_errno().
|
inlineprotected |
Definition at line 586 of file upscaledb.hpp.
References m_cursor.
|
inline |
Clones the Cursor.
Definition at line 489 of file upscaledb.hpp.
References cursor(), error(), m_cursor, and ups_cursor_clone().
|
inline |
Closes the Cursor.
Definition at line 575 of file upscaledb.hpp.
References error(), m_cursor, and ups_cursor_close().
Creates a new Cursor.
Definition at line 477 of file upscaledb.hpp.
References close(), error(), upscaledb::db::get_handle(), m_cursor, and ups_cursor_create().
Referenced by cursor().
|
inline |
Erases the current key/record pair.
Definition at line 550 of file upscaledb.hpp.
References error(), m_cursor, and ups_cursor_erase().
Finds a key.
Definition at line 534 of file upscaledb.hpp.
References error(), upscaledb::key::get_handle(), m_cursor, and ups_cursor_find().
Referenced by run_demo().
Returns the number of duplicate keys.
Definition at line 557 of file upscaledb.hpp.
References error(), m_cursor, and ups_cursor_get_duplicate_count().
|
inline |
Returns the size of the current record.
Definition at line 566 of file upscaledb.hpp.
References error(), m_cursor, and ups_cursor_get_record_size().
Inserts a key/record pair.
Definition at line 542 of file upscaledb.hpp.
References error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), m_cursor, and ups_cursor_insert().
Moves the Cursor, and retrieves the key/record of the new position.
Definition at line 498 of file upscaledb.hpp.
References error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), m_cursor, and ups_cursor_move().
Referenced by move_first(), move_last(), move_next(), move_previous(), and run_demo().
Moves the Cursor to the first Database element.
Definition at line 506 of file upscaledb.hpp.
References move(), and UPS_CURSOR_FIRST.
Moves the Cursor to the last Database element.
Definition at line 511 of file upscaledb.hpp.
References move(), and UPS_CURSOR_LAST.
Moves the Cursor to the next Database element.
Definition at line 516 of file upscaledb.hpp.
References move(), and UPS_CURSOR_NEXT.
Referenced by run_demo().
Moves the Cursor to the previous Database element.
Definition at line 521 of file upscaledb.hpp.
References move(), and UPS_CURSOR_PREVIOUS.
Overwrites the current record.
Definition at line 526 of file upscaledb.hpp.
References error(), upscaledb::record::get_handle(), m_cursor, and ups_cursor_overwrite().
|
private |
Definition at line 591 of file upscaledb.hpp.
Referenced by clone(), close(), create(), cursor(), erase(), find(), get_duplicate_count(), get_record_size(), insert(), move(), and overwrite().