typedef struct ham_device_t ham_device_t |
Definition at line 342 of file hamsterdb_int.h.
typedef ham_status_t(* ham_file_filter_after_read_cb_t)(ham_env_t *env, ham_file_filter_t *filter, ham_u8_t *file_data, ham_size_t file_size) |
A callback function for a file-level filter; called immediately after the data is read from disk
Definition at line 149 of file hamsterdb_int.h.
typedef ham_status_t(* ham_file_filter_before_write_cb_t)(ham_env_t *env, ham_file_filter_t *filter, ham_u8_t *file_data, ham_size_t file_size) |
A callback function for a file-level filter; called before the data is written to disk
Definition at line 142 of file hamsterdb_int.h.
typedef void(* ham_file_filter_close_cb_t)(ham_env_t *env, ham_file_filter_t *filter) |
A callback function for a file-level filter; called immediately before the Environment is closed. Can be used to avoid memory leaks.
Definition at line 156 of file hamsterdb_int.h.
typedef struct ham_file_filter_t ham_file_filter_t |
Definition at line 136 of file hamsterdb_int.h.
typedef ham_status_t(* ham_record_filter_after_read_cb_t)(ham_db_t *db, ham_record_filter_t *filter, ham_record_t *record) |
A callback function for a record-level filter; called immediately after the record is read from disk, and before it is returned to the user.
Definition at line 241 of file hamsterdb_int.h.
typedef ham_status_t(* ham_record_filter_before_insert_cb_t)(ham_db_t *db, ham_record_filter_t *filter, ham_record_t *record) |
A callback function for a record-level filter; called before the record is inserted
Definition at line 234 of file hamsterdb_int.h.
typedef void(* ham_record_filter_close_cb_t)(ham_db_t *db, ham_record_filter_t *filter) |
A callback function for a record-level filter; called immediately before the Database is closed. Can be used to avoid memory leaks.
Definition at line 248 of file hamsterdb_int.h.
typedef struct ham_record_filter_t ham_record_filter_t |
Definition at line 228 of file hamsterdb_int.h.
HAM_EXPORT ham_status_t HAM_CALLCONV ham_add_record_filter | ( | ham_db_t * | db, | |
ham_record_filter_t * | filter | |||
) |
A function to install a record-level filter.
Record-level filters are usually installed immediately after the Database is created with ham_create[_ex] or opened with ham_open[_ex].
db | A valid Database handle | |
filter | A pointer to a ham_record_filter_t structure |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_calc_maxkeys_per_page | ( | ham_db_t * | db, | |
ham_size_t * | keycount, | |||
ham_u16_t | keysize | |||
) |
Estimates the number of keys stored per page in the Database
db | A valid Database handle | |
keycount | A reference to a variable which will receive the calculated key count per page | |
keysize | The size of the key |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_check_integrity | ( | ham_db_t * | db, | |
ham_txn_t * | txn | |||
) |
Verifies the integrity of the Database
This function is only interesting if you want to debug hamsterdb.
Returns HAM_NOT_IMPLEMENTED unless hamsterdb was built with HAM_ENABLE_INTERNAL (run ./configure --enable-internal).
db | A valid Database handle | |
txn | A Transaction handle, or NULL |
HAM_EXPORT ham_db_t* HAM_CALLCONV ham_cursor_get_database | ( | ham_cursor_t * | cursor | ) |
Retrieves the Database handle of a Cursor
cursor | A valid Cursor handle |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_env_add_file_filter | ( | ham_env_t * | env, | |
ham_file_filter_t * | filter | |||
) |
A function to install a file-level filter.
File-level filters are usually installed immediately after the Environment is created with ham_env_create[_ex] or opened with ham_env_open[_ex].
env | A valid Environment handle | |
filter | A pointer to a ham_file_filter_t structure |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_env_remove_file_filter | ( | ham_env_t * | env, | |
ham_file_filter_t * | filter | |||
) |
A function to remove a file-level filter.
This function is usually not necessary - the lifetime of a file-filter usually starts before the first Database operation, and ends when the Environment is closed. It is not recommended to use this function.
env | A valid Environment handle | |
filter | A pointer to a ham_file_filter_t structure |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_env_set_device | ( | ham_env_t * | env, | |
ham_device_t * | device | |||
) |
HAM_EXPORT void* HAM_CALLCONV ham_get_context_data | ( | ham_db_t * | db | ) |
Retrieves a user-provided context pointer
This function retrieves a user-provided context pointer. This can be any arbitrary pointer which was previously stored with ham_set_context_data.
db | A valid Database handle |
HAM_EXPORT ham_status_t HAM_CALLCONV ham_remove_record_filter | ( | ham_db_t * | db, | |
ham_record_filter_t * | filter | |||
) |
A function to remove a record-level filter.
This function is usually not necessary - the lifetime of a record-filter usually starts before the first Database operation, and ends when the Database is closed. It is not recommended to use this function.
db | A valid Database handle | |
filter | A pointer to a ham_record_filter_t structure |
HAM_EXPORT void HAM_CALLCONV ham_set_context_data | ( | ham_db_t * | db, | |
void * | data | |||
) |
Set a user-provided context pointer
This function sets a user-provided context pointer. This can be any arbitrary pointer; it is stored in the Database handle and can be retrieved with ham_get_context_data. It is mainly used by Wrappers and language bindings.
db | A valid Database handle | |
data | The pointer to the context data |