DuroDBMS API
1.7
|
Functions | |
void | RDB_init_exec_context (RDB_exec_context *ecp) |
void | RDB_destroy_exec_context (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_err (RDB_exec_context *ecp) |
RDB_object * | RDB_get_err (RDB_exec_context *ecp) |
void | RDB_clear_err (RDB_exec_context *ecp) |
RDB_bool | RDB_err_retryable (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_no_memory (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_no_running_tx (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_not_found (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_invalid_argument (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_type_mismatch (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_operator_not_found (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_type_not_found (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_type_constraint_violation (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_element_exists (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_key_violation (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_not_supported (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_name (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_predicate_violation (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_in_use (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_system (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_resource_not_found (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_internal (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_concurrency (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_aggregate_undefined (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_version_mismatch (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_deadlock (RDB_exec_context *ecp) |
RDB_object * | RDB_raise_data_corrupted (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_run_recovery (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_syntax (const char *msg, RDB_exec_context *ecp) |
RDB_object * | RDB_raise_connection (const char *msg, RDB_exec_context *ecp) |
int | RDB_ec_set_property (RDB_exec_context *ecp, const char *name, void *val) |
void * | RDB_ec_property (RDB_exec_context *ecp, const char *name) |
void | RDB_errno_to_error (int errcode, RDB_exec_context *ecp) |
void RDB_clear_err | ( | RDB_exec_context * | ecp | ) |
RDB_clear_err clears the error associated with the RDB_exec_context given by ecp, freing all resources associated with it. Subsequent calls calls to RDB_get_err will return NULL.
References RDB_destroy_obj().
Referenced by Duro_dt_execute(), and RDB_extract_tuple().
void RDB_destroy_exec_context | ( | RDB_exec_context * | ecp | ) |
RDB_destroy_exec_context frees all resources associated with a RDB_exec_context.
References RDB_destroy_obj().
Referenced by Duro_destroy_interp(), and Duro_print_error_f().
void* RDB_ec_property | ( | RDB_exec_context * | ecp, |
const char * | name | ||
) |
Return the value of the property name of the RDB_exec_context given by ecp.
The property value.
int RDB_ec_set_property | ( | RDB_exec_context * | ecp, |
const char * | name, | ||
void * | val | ||
) |
RDB_ec_set_property sets the property name of the RDB_exec_context given by ecp to val.
RDB_OK on success, RDB_ERROR on failure.
References RDB_errno_to_error().
Referenced by Duro_dt_execute(), and Duro_dt_execute_str().
RDB_bool RDB_err_retryable | ( | RDB_exec_context * | ecp | ) |
Returns RDB_TRUE if a retryable error has been raised, RDB_FALSE if not.
void RDB_errno_to_error | ( | int | errcode, |
RDB_exec_context * | ecp | ||
) |
Raises an error that corresponds to the POSIX error code errcode.
References RDB_raise_no_memory().
Referenced by Duro_dt_put_creop_info(), and RDB_ec_set_property().
RDB_object* RDB_get_err | ( | RDB_exec_context * | ecp | ) |
Returns the error associated with the RDB_exec_context given by ecp.
A pointer to the error associated with the RDB_exec_context, or NULL if no error has been raised.
Referenced by Duro_dt_execute(), RDB_call_update_op_by_name(), RDB_extract_tuple(), RDB_get_update_op(), RDB_get_update_op_by_args(), and RDB_move_tuples().
void RDB_init_exec_context | ( | RDB_exec_context * | ecp | ) |
RDB_init_exec_context initializes the RDB_exec_context structure given by ecp. RDB_init_exec_context must be called before any other operation can be performed on a RDB_exec_context structure.
Referenced by Duro_destroy_interp(), and Duro_print_error_f().
RDB_object* RDB_raise_err | ( | RDB_exec_context * | ecp | ) |
RDB_raise_err initializes a RDB_object structure, makes it the error associated with the RDB_exec_context given by ecp, and returns a pointer to it. A previously raised error is overwritten. After RDB_raise_err() has been called succssfully, the RDB_object is in the same state as after a call to RDB_init_obj(). It is the caller's responsibility to assign a value to the RDB_object, for example, by calling a selector.
A pointer to the error, or NULL if the call fails.
The call may fail and return NULL if an error was already associated with the RDB_exec_context and destroying this error failed.
References RDB_destroy_obj(), and RDB_init_obj().
Referenced by RDB_raise_no_memory().
RDB_object* RDB_raise_no_memory | ( | RDB_exec_context * | ecp | ) |
Convenience function to raise a system-provided error.
References RDB_raise_err().
Referenced by RDB_alloc(), RDB_env_get_errfile(), RDB_errno_to_error(), RDB_new_scalar_type(), RDB_realloc(), RDB_set_cleanup(), and RDB_set_op_cleanup_fn().