upscaledb
2.2.1
|
#include <upscaledb.hpp>
Public Member Functions | |
env () | |
~env () | |
void | create (const char *filename, uint32_t flags=0, uint32_t mode=0644, const ups_parameter_t *param=0) |
void | open (const char *filename, uint32_t flags=0, const ups_parameter_t *param=0) |
void | flush (uint32_t flags=0) |
db | create_db (uint16_t name, uint32_t flags=0, const ups_parameter_t *param=0) |
db | open_db (uint16_t name, uint32_t flags=0, const ups_parameter_t *param=0) |
void | rename_db (uint16_t oldname, uint16_t newname, uint32_t flags=0) |
void | erase_db (uint16_t name, uint32_t flags=0) |
txn | begin (const char *name=0, uint32_t flags=0) |
void | close (uint32_t flags=0) |
void | get_parameters (ups_parameter_t *param) |
std::vector< uint16_t > | get_database_names () |
Private Attributes | |
ups_env_t * | _env |
An Environment class.
This class wraps the ups_env_t structure.
Definition at line 592 of file upscaledb.hpp.
|
inline |
Constructor
Definition at line 595 of file upscaledb.hpp.
|
inline |
Destructor - automatically closes the Environment, if necessary.
!! Any exception is silently discarded. Use of the destructor to close environments is therefore not recommended, because there are valid reasons why an Exception can be thrown (i.e. not all Databases were closed or not all Txns were committed/aborted).
An assert() was added to catch this condition in debug builds.
Definition at line 610 of file upscaledb.hpp.
References upscaledb::error::get_errno().
Begin a new Txn
Definition at line 681 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_txn_begin().
|
inline |
Closes the Environment.
Definition at line 691 of file upscaledb.hpp.
References upscaledb::error::error(), UPS_AUTO_CLEANUP, and ups_env_close().
Referenced by run_demo().
|
inline |
Creates a new Environment.
Definition at line 620 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_create().
Referenced by run_demo().
|
inline |
Creates a new Database in the Environment.
Definition at line 643 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_create_db().
Referenced by run_demo().
Deletes a Database from the Environment.
Definition at line 674 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_erase_db().
|
inline |
Flushes the Environment to disk.
Definition at line 636 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_flush().
|
inline |
Get all Database names.
Definition at line 711 of file upscaledb.hpp.
References upscaledb::error::error(), ups_env_get_database_names(), and UPS_LIMITS_REACHED.
|
inline |
Retrieves Environment parameters.
Definition at line 704 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_get_parameters().
|
inline |
Opens an existing Environment.
Definition at line 628 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_open().
Referenced by run_demo().
|
inline |
Opens an existing Database in the Environment.
Definition at line 655 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_open_db().
Referenced by run_demo().
Renames an existing Database in the Environment.
Definition at line 667 of file upscaledb.hpp.
References upscaledb::error::error(), and ups_env_rename_db().
|
private |
Definition at line 731 of file upscaledb.hpp.