hamsterdb Embedded Database 1.1.15
|
#include <hamsterdb.hpp>
Public Member Functions | |
env () | |
~env () | |
void | create (const char *filename, ham_u32_t flags=0, ham_u32_t mode=0644, const ham_parameter_t *param=0) |
void | open (const char *filename, ham_u32_t flags=0, const ham_parameter_t *param=0) |
db | create_db (ham_u16_t name, ham_u32_t flags=0, const ham_parameter_t *param=0) |
db | open_db (ham_u16_t name, ham_u32_t flags=0, const ham_parameter_t *param=0) |
void | rename_db (ham_u16_t oldname, ham_u16_t newname, ham_u32_t flags=0) |
void | erase_db (ham_u16_t name, ham_u32_t flags=0) |
void | close (void) |
void | get_parameters (ham_parameter_t *param) |
void | enable_encryption (ham_u8_t key[16], ham_u32_t flags=0) |
std::vector< ham_u16_t > | get_database_names (void) |
Private Attributes | |
ham_env_t * | m_env |
An Environment class.
This class wraps the ham_env_t structure.
Definition at line 638 of file hamsterdb.hpp.
ham::env::env | ( | ) | [inline] |
Constructor
Definition at line 642 of file hamsterdb.hpp.
ham::env::~env | ( | ) | [inline] |
Destructor - automatically closes the Cursor, if necessary.
Definition at line 646 of file hamsterdb.hpp.
References close().
void ham::env::close | ( | void | ) | [inline] |
Closes the Environment.
Definition at line 731 of file hamsterdb.hpp.
References error(), ham_env_close(), ham_env_delete(), and m_env.
Referenced by ~env().
void ham::env::create | ( | const char * | filename, |
ham_u32_t | flags = 0 , |
||
ham_u32_t | mode = 0644 , |
||
const ham_parameter_t * | param = 0 |
||
) | [inline] |
Creates a new Environment.
Definition at line 651 of file hamsterdb.hpp.
References error(), ham_env_create_ex(), ham_env_new(), and m_env.
Referenced by run_demo().
db ham::env::create_db | ( | ham_u16_t | name, |
ham_u32_t | flags = 0 , |
||
const ham_parameter_t * | param = 0 |
||
) | [inline] |
Creates a new Database in the Environment.
Definition at line 679 of file hamsterdb.hpp.
References error(), ham_delete(), ham_env_create_db(), ham_new(), and m_env.
Referenced by run_demo().
Enable AES encryption.
Definition at line 751 of file hamsterdb.hpp.
References error(), ham_env_enable_encryption(), and m_env.
Deletes a Database from the Environment.
Definition at line 722 of file hamsterdb.hpp.
References error(), ham_env_erase_db(), and m_env.
std::vector<ham_u16_t> ham::env::get_database_names | ( | void | ) | [inline] |
Get all Database names.
Definition at line 758 of file hamsterdb.hpp.
References error(), ham_env_get_database_names(), HAM_LIMITS_REACHED, and m_env.
void ham::env::get_parameters | ( | ham_parameter_t * | param | ) | [inline] |
Retrieves Environment parameters.
Definition at line 744 of file hamsterdb.hpp.
References error(), ham_env_get_parameters(), and m_env.
void ham::env::open | ( | const char * | filename, |
ham_u32_t | flags = 0 , |
||
const ham_parameter_t * | param = 0 |
||
) | [inline] |
Opens an existing Environment.
Definition at line 665 of file hamsterdb.hpp.
References error(), ham_env_new(), ham_env_open_ex(), and m_env.
db ham::env::open_db | ( | ham_u16_t | name, |
ham_u32_t | flags = 0 , |
||
const ham_parameter_t * | param = 0 |
||
) | [inline] |
Opens an existing Database in the Environment.
Definition at line 697 of file hamsterdb.hpp.
References error(), ham_delete(), ham_env_open_db(), ham_new(), and m_env.
Renames an existing Database in the Environment.
Definition at line 715 of file hamsterdb.hpp.
References error(), ham_env_rename_db(), and m_env.
ham_env_t* ham::env::m_env [private] |
Definition at line 778 of file hamsterdb.hpp.
Referenced by close(), create(), create_db(), enable_encryption(), erase_db(), get_database_names(), get_parameters(), open(), open_db(), and rename_db().