HAM_EXPORT ham_status_t HAM_CALLCONV ham_create | ( | ham_db_t * | db, | |
const char * | filename, | |||
ham_u32_t | flags, | |||
ham_u32_t | mode | |||
) |
Creates a Database
db | A valid Database handle | |
filename | The filename of the Database file. If the file already exists, it is overwritten. Can be NULL if you create an In-Memory Database | |
flags | Optional flags for opening the Database, combined with bitwise OR. For allowed flags, see ham_create_ex. | |
mode | File access rights for the new file. This is the mode parameter for creat(2). Ignored on Microsoft Windows. |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_create_ex | ( | ham_db_t * | db, | |
const char * | filename, | |||
ham_u32_t | flags, | |||
ham_u32_t | mode, | |||
const ham_parameter_t * | param | |||
) |
Creates a Database - extended version
db | A valid Database handle | |
filename | The filename of the Database file. If the file already exists, it will be overwritten. Can be NULL if you create an In-Memory Database | |
flags | Optional flags for opening the Database, combined with bitwise OR. Possible flags are:
| |
mode | File access rights for the new file. This is the mode parameter for creat(2). Ignored on Microsoft Windows. | |
param | An array of ham_parameter_t structures. The following parameters are available:
|
Referenced by ham::db::create().
HAM_EXPORT ham_status_t HAM_CALLCONV ham_delete | ( | ham_db_t * | db | ) |
Frees a ham_db_t handle
Frees the memory and resources of a ham_db_t structure, but does not close the Database. Call this function AFTER you have closed the Database using ham_close, or you will lose your data!
db | A valid Database handle |
Referenced by ham::db::close(), ham::env::create_db(), and ham::env::open_db().
HAM_EXPORT ham_status_t HAM_CALLCONV ham_new | ( | ham_db_t ** | db | ) |
Allocates a ham_db_t handle
db | Pointer to the pointer which is allocated |
Referenced by ham::db::create(), ham::env::create_db(), ham::db::open(), and ham::env::open_db().
HAM_EXPORT ham_status_t HAM_CALLCONV ham_open | ( | ham_db_t * | db, | |
const char * | filename, | |||
ham_u32_t | flags | |||
) |
Opens an existing Database
db | A valid Database handle | |
filename | The filename of the Database file | |
flags | Optional flags for opening the Database, combined with bitwise OR. See the documentation of ham_open_ex for the allowed flags. |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_open_ex | ( | ham_db_t * | db, | |
const char * | filename, | |||
ham_u32_t | flags, | |||
const ham_parameter_t * | param | |||
) |
Opens an existing Database - extended version
db | A valid Database handle | |
filename | The filename of the Database file | |
flags | Optional flags for opening the Database, combined with bitwise OR. Possible flags are:
| |
param | An array of ham_parameter_t structures. The following parameters are available:
|
Referenced by ham::db::open().
ham_u32_t ham_key_t::_flags [inherited] |
For internal use
Definition at line 137 of file hamsterdb.h.
ham_u32_t ham_record_t::_intflags [inherited] |
For internal use
Definition at line 93 of file hamsterdb.h.
ham_u64_t ham_record_t::_rid [inherited] |
For internal use
Definition at line 96 of file hamsterdb.h.
void* ham_key_t::data [inherited] |
The data of the key
Definition at line 131 of file hamsterdb.h.
Referenced by ham::key::get_data(), ham::key::key(), and ham::key::set_data().
void* ham_record_t::data [inherited] |
Pointer to the record data
Definition at line 81 of file hamsterdb.h.
Referenced by ham::record::get_data(), ham::record::record(), and ham::record::set_data().
ham_u32_t ham_key_t::flags [inherited] |
The key flags; see HAM_KEY_USER_ALLOC
Definition at line 134 of file hamsterdb.h.
Referenced by ham::key::get_flags(), ham::key::key(), and ham::key::set_flags().
ham_u32_t ham_record_t::flags [inherited] |
The record flags; see HAM_RECORD_USER_ALLOC
Definition at line 84 of file hamsterdb.h.
Referenced by ham::record::get_flags(), ham::record::record(), and ham::record::set_flags().
ham_u32_t ham_record_t::partial_offset [inherited] |
Offset for partial reading/writing; see HAM_PARTIAL
Definition at line 87 of file hamsterdb.h.
ham_size_t ham_record_t::partial_size [inherited] |
Size for partial reading/writing; see HAM_PARTIAL
Definition at line 90 of file hamsterdb.h.
ham_u64_t ham_parameter_t::value [inherited] |
The value of the parameter.
Definition at line 168 of file hamsterdb.h.