upscaledb
2.2.1
|
Data Structures | |
struct | min_max_avg_u32_t |
struct | btree_metrics_t |
struct | ups_env_metrics_t |
struct | ups_operation_t |
Macros | |
#define | ups_key_get_intflags(key) (key)->_flags |
#define | ups_key_set_intflags(key, f) (key)->_flags=(f) |
#define | UPS_PRINT_GRAPH 1 |
#define | UPS_METRICS_VERSION 9 |
#define | UPS_OP_INSERT 1 |
#define | UPS_OP_ERASE 2 |
#define | UPS_OP_FIND 3 |
Typedefs | |
typedef struct min_max_avg_u32_t | min_max_avg_u32_t |
typedef struct btree_metrics_t | btree_metrics_t |
typedef struct ups_env_metrics_t | ups_env_metrics_t |
#define ups_key_get_intflags | ( | key | ) | (key)->_flags |
get the (non-persisted) flags of a key
Definition at line 46 of file upscaledb_int.h.
#define ups_key_set_intflags | ( | key, | |
f | |||
) | (key)->_flags=(f) |
set the flags of a key
Note that the ups_find/ups_cursor_find/ups_cursor_find_ex flags must be defined such that those can peacefully co-exist with these; that's why those public flags start at the value 0x1000 (4096).
Definition at line 55 of file upscaledb_int.h.
#define UPS_METRICS_VERSION 9 |
Retrieves collected metrics from the upscaledb Environment. Used mainly for testing. See below for the structure with the currently available metrics. This structure will change a lot; the first field is a version indicator that applications can use to verify that the structure layout is compatible.
These metrics are NOT persisted to disk.
Metrics marked "global" are stored globally and shared between multiple Environments.
Definition at line 212 of file upscaledb_int.h.
#define UPS_OP_ERASE 2 |
Definition at line 391 of file upscaledb_int.h.
#define UPS_OP_FIND 3 |
Definition at line 392 of file upscaledb_int.h.
#define UPS_OP_INSERT 1 |
Definition at line 390 of file upscaledb_int.h.
#define UPS_PRINT_GRAPH 1 |
Flag for ups_db_check_integrity
Definition at line 105 of file upscaledb_int.h.
typedef struct btree_metrics_t btree_metrics_t |
typedef struct min_max_avg_u32_t min_max_avg_u32_t |
typedef struct ups_env_metrics_t ups_env_metrics_t |
UPS_EXPORT void UPS_CALLCONV ups_at_exit | ( | ) |
A function which cleans up statically allocated memory.
Typically, you do not have to call this function because it is automatically registered as an exit-handler (with at_exit()).
UPS_EXPORT uint32_t UPS_CALLCONV ups_calc_compare_name_hash | ( | const char * | zname | ) |
Returns the hash of a compare function name. The name is case-insensitive.
UPS_EXPORT ups_db_t* UPS_CALLCONV ups_cursor_get_database | ( | ups_cursor_t * | cursor | ) |
Retrieves the Database handle of a Cursor
cursor | A valid Cursor handle |
UPS_EXPORT ups_status_t UPS_CALLCONV ups_db_bulk_operations | ( | ups_db_t * | db, |
ups_txn_t * | txn, | ||
struct ups_operation_t * | operations, | ||
size_t | operations_length, | ||
uint32_t | flags | ||
) |
Perform bulk operations on a database
This function receives an array of ups_operation_t structures and performs the necessary calls to ups_db_insert, ups_db_erase and ups_db_find.
The txn parameter is passed to ups_db_insert, ups_db_erase and ups_db_find.
UPS_EXPORT ups_status_t UPS_CALLCONV ups_db_check_integrity | ( | ups_db_t * | db, |
uint32_t | flags | ||
) |
Verifies the integrity of the Database
This function is only interesting if you want to debug upscaledb.
db | A valid Database handle |
flags | Optional flags for the integrity check, combined with bitwise OR. Possible flags are:
|
UPS_EXPORT uint32_t UPS_CALLCONV ups_db_get_compare_name_hash | ( | ups_db_t * | db | ) |
Returns the hash of a compare function name of a database.
UPS_EXPORT uint32_t UPS_CALLCONV ups_db_get_flags | ( | ups_db_t * | hdb | ) |
Returns the flags of the database.
UPS_EXPORT uint16_t UPS_CALLCONV ups_db_get_name | ( | ups_db_t * | hdb | ) |
Returns the "name" of the database.
UPS_EXPORT ups_status_t UPS_CALLCONV ups_env_get_metrics | ( | ups_env_t * | env, |
ups_env_metrics_t * | metrics | ||
) |
Retrieves the current metrics from an Environment
UPS_EXPORT ups_db_t* UPS_CALLCONV ups_env_get_open_database | ( | ups_env_t * | env, |
uint16_t | name | ||
) |
Returns an open database handle, or 0 if it was not yet opened
UPS_EXPORT void* UPS_CALLCONV ups_get_context_data | ( | ups_db_t * | db, |
ups_bool_t | dont_lock | ||
) |
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 ups_set_context_data.
db | A valid Database handle |
dont_lock | Whether the Environment mutex should be locked or not this is used to avoid recursive locks when retrieving the context data in a compare function |
UPS_EXPORT ups_bool_t UPS_CALLCONV ups_is_debug | ( | ) |
Returns UPS_TRUE if this upscaledb library was compiled with debug diagnostics, checks and asserts
UPS_EXPORT int UPS_CALLCONV ups_key_get_approximate_match_type | ( | ups_key_t * | key | ) |
Returns the kind of key match which produced this key as it was returned by one of the ups_db_find() and ups_cursor_find().
This routine assumes the key was passed back by one of the ups_db_find and ups_cursor_find functions and not used by any other upscaledb functions after that.
As such, this function produces an answer akin to the 'sign' of the specified key as it was returned by the find operation.
key | A valid key |
UPS_EXPORT void UPS_CALLCONV ups_set_committed_flush_threshold | ( | int | threshold | ) |
Sets the threshold for flushing batched (committed) Transactions to disk.
UPS_EXPORT void UPS_CALLCONV ups_set_context_data | ( | ups_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 ups_get_context_data. It is mainly used by Wrappers and language bindings.
db | A valid Database handle |
data | The pointer to the context data |