hamsterdb API Documentation
ham::env Class Reference
#include <hamsterdb.hpp>
Public Member Functions | |
| env () | |
| ~env () | |
| void | create (const char *filename, ham_u32_t flags=0, ham_u32_t mode=0644, ham_parameter_t *param=0) |
| void | open (const char *filename, ham_u32_t flags=0, ham_parameter_t *param=0) |
| db | create_db (ham_u16_t name, ham_u32_t flags=0, ham_parameter_t *param=0) |
| db | open_db (ham_u16_t name, ham_u32_t flags=0, 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 | 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 |
Detailed Description
An Environment class.This class wraps the ham_env_t structure.
Definition at line 573 of file hamsterdb.hpp.
Constructor & Destructor Documentation
| ham::env::env | ( | ) | [inline] |
Constructor
Definition at line 577 of file hamsterdb.hpp.
| ham::env::~env | ( | ) | [inline] |
Destructor - automatically closes the Cursor, if necessary.
Definition at line 581 of file hamsterdb.hpp.
References close().
Member Function Documentation
| void ham::env::create | ( | const char * | filename, | |
| ham_u32_t | flags = 0, |
|||
| ham_u32_t | mode = 0644, |
|||
| ham_parameter_t * | param = 0 | |||
| ) | [inline] |
Creates a new Environment.
Definition at line 586 of file hamsterdb.hpp.
References ham_env_create_ex(), ham_env_new(), and m_env.
| void ham::env::open | ( | const char * | filename, | |
| ham_u32_t | flags = 0, |
|||
| ham_parameter_t * | param = 0 | |||
| ) | [inline] |
Opens an existing Environment.
Definition at line 599 of file hamsterdb.hpp.
References ham_env_new(), ham_env_open_ex(), and m_env.
| db ham::env::create_db | ( | ham_u16_t | name, | |
| ham_u32_t | flags = 0, |
|||
| ham_parameter_t * | param = 0 | |||
| ) | [inline] |
Creates a new Database in the Environment.
Definition at line 612 of file hamsterdb.hpp.
References ham_delete(), ham_env_create_db(), ham_new(), and m_env.
| db ham::env::open_db | ( | ham_u16_t | name, | |
| ham_u32_t | flags = 0, |
|||
| ham_parameter_t * | param = 0 | |||
| ) | [inline] |
Opens an existing Database in the Environment.
Definition at line 629 of file hamsterdb.hpp.
References ham_delete(), ham_env_open_db(), ham_new(), and m_env.
Renames an existing Database in the Environment.
Definition at line 646 of file hamsterdb.hpp.
References ham_env_rename_db(), and m_env.
Deletes a Database from the Environment.
Definition at line 653 of file hamsterdb.hpp.
References ham_env_erase_db(), and m_env.
| void ham::env::close | ( | void | ) | [inline] |
Closes the Environment.
Definition at line 662 of file hamsterdb.hpp.
References ham_env_close(), ham_env_delete(), and m_env.
Referenced by ~env().
Enable AES encryption.
Definition at line 675 of file hamsterdb.hpp.
References ham_env_enable_encryption(), and m_env.
| std::vector<ham_u16_t> ham::env::get_database_names | ( | void | ) | [inline] |
Get all Database names.
Definition at line 682 of file hamsterdb.hpp.
References ham_env_get_database_names(), HAM_LIMITS_REACHED, and m_env.
Field Documentation
ham_env_t* ham::env::m_env [private] |
Definition at line 702 of file hamsterdb.hpp.
Referenced by close(), create(), create_db(), enable_encryption(), erase_db(), get_database_names(), open(), open_db(), and rename_db().
The documentation for this class was generated from the following file:
- include/ham/hamsterdb.hpp