upscaledb
2.2.1
|
#include <upscaledb.hpp>
Public Member Functions | |
db () | |
~db () | |
db & | operator= (const db &other) |
void | set_compare_func (ups_compare_func_t foo) |
record | find (txn *t, key *k, uint32_t flags=0) |
record & | find (txn *t, key *k, record *r, uint32_t flags=0) |
record | find (key *k, uint32_t flags=0) |
void | insert (txn *t, key *k, record *r, uint32_t flags=0) |
void | insert (key *k, record *r, uint32_t flags=0) |
void | erase (key *k, uint32_t flags=0) |
void | erase (txn *t, key *k, uint32_t flags=0) |
uint64_t | count (ups_txn_t *txn=0, uint32_t flags=0) |
void | get_parameters (ups_parameter_t *param) |
void | close (uint32_t flags=0) |
ups_db_t * | get_handle () |
Static Public Member Functions | |
static void | set_errhandler (ups_error_handler_fun f) |
static void | get_version (uint32_t *major, uint32_t *minor, uint32_t *revision) |
Protected Member Functions | |
db (ups_db_t *db) | |
Private Attributes | |
ups_db_t * | _db |
Friends | |
class | env |
A Database class.
This class wraps the ups_db_t Database handles.
Definition at line 272 of file upscaledb.hpp.
|
inline |
Constructor
Definition at line 286 of file upscaledb.hpp.
|
inline |
Destructor - automatically closes the Database, if necessary.
!! Any exception is silently discarded. Use of the destructor to clean up open databases is therefore not recommended, because there are valid reasons why an Exception can be thrown (i.e. not all Cursors of this database were closed).
An assert() was added to catch this condition in debug builds.
Definition at line 301 of file upscaledb.hpp.
References upscaledb::error::get_errno().
|
inlineprotected |
Definition at line 422 of file upscaledb.hpp.
|
inline |
Closes the Database. Ignores the flag |UPS_AUTO_CLEANUP|. All objects will be destroyed automatically when they are destructed.
Definition at line 403 of file upscaledb.hpp.
References upscaledb::error::error(), UPS_AUTO_CLEANUP, and ups_db_close().
Referenced by run_demo().
Returns number of items in the Database.
Definition at line 384 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_db_count().
Erases a key/record pair.
Definition at line 376 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::txn::get_handle(), and ups_db_erase().
Finds a record by looking up the key.
Definition at line 334 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), upscaledb::txn::get_handle(), and ups_db_find().
Referenced by run_demo().
Finds a record by looking up the key.
Definition at line 344 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), upscaledb::txn::get_handle(), and ups_db_find().
Finds a record by looking up the key.
Definition at line 353 of file upscaledb.hpp.
|
inline |
Returns a pointer to the internal ups_db_t structure.
Definition at line 414 of file upscaledb.hpp.
Referenced by upscaledb::cursor::create().
|
inline |
Retrieves Database parameters.
Definition at line 393 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_db_get_parameters().
|
inlinestatic |
Retrieves the upscaledb library version.
Definition at line 280 of file upscaledb.hpp.
References ups_get_version().
Inserts a key/record pair.
Definition at line 358 of file upscaledb.hpp.
References upscaledb::error::error(), upscaledb::key::get_handle(), upscaledb::record::get_handle(), upscaledb::txn::get_handle(), and ups_db_insert().
Referenced by run_demo().
Inserts a key/record pair.
Definition at line 366 of file upscaledb.hpp.
Assignment operator.
Important! This operator transfers the ownership of the Database handle.B
Definition at line 316 of file upscaledb.hpp.
References _db.
|
inline |
Sets the comparison function.
Definition at line 327 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_db_set_compare_func().
|
inlinestatic |
Set error handler function.
Definition at line 275 of file upscaledb.hpp.
References ups_set_error_handler().
|
friend |
Definition at line 419 of file upscaledb.hpp.
|
private |
Definition at line 427 of file upscaledb.hpp.
Referenced by operator=().