DuroDBMS API  1.2
Functions
Execution context functions

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)
 
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)
 
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_lock_not_granted (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)
 

Detailed Description

Function Documentation

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(), RDB_drop_type(), RDB_drop_typeimpl_ops(), RDB_expr_resolve_varnames(), RDB_extract_tuple(), RDB_get_update_op(), RDB_get_update_op_by_args(), RDB_move_tuples(), and RDB_subset().

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.

Returns

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.

Returns

RDB_OK on success, RDB_ERROR on failure.

References RDB_errno_to_error().

Referenced by Duro_dt_execute(), and Duro_dt_execute_str().

void RDB_errno_to_error ( int  errcode,
RDB_exec_context *  ecp 
)

Raise an error that corresponds to the error code errcode. errcode can be a POSIX error code, a Berkeley DB error code or an error code from the record layer.

References RDB_raise_invalid_argument(), RDB_raise_no_memory(), RDB_raise_resource_not_found(), and RDB_raise_system().

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.

Returns

A pointer to the error associated with the RDB_exec_context, or NULL if no error has been raised.

Referenced by Duro_dt_execute(), Duro_dt_execute_str(), RDB_all(), RDB_any(), RDB_avg(), RDB_call_update_op_by_name(), RDB_create_ro_op_version(), RDB_drop_type(), RDB_drop_typeimpl_ops(), RDB_extract_tuple(), RDB_get_table(), RDB_get_type(), RDB_get_update_op(), RDB_get_update_op_by_args(), RDB_max(), RDB_min(), RDB_move_tuples(), RDB_parse_expr(), RDB_set_table_name(), RDB_subset(), and RDB_sum().

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_aggregate_undefined ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

References RDB_raise_err().

Referenced by RDB_avg().

RDB_object* RDB_raise_data_corrupted ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_irep_to_obj().

RDB_object* RDB_raise_deadlock ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

References RDB_raise_err().

RDB_object* RDB_raise_element_exists ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_create_ro_op_version(), and RDB_drop_db().

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.

Returns

A pointer to the error, or NULL if the call fails.

Errors:

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_aggregate_undefined(), RDB_raise_deadlock(), RDB_raise_lock_not_granted(), RDB_raise_no_memory(), RDB_raise_no_running_tx(), and RDB_raise_version_mismatch().

RDB_object* RDB_raise_in_use ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_drop_table(), and RDB_drop_type().

RDB_object* RDB_raise_internal ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by Duro_dt_execute_str(), RDB_drop_table_index(), RDB_obj_set_property(), RDB_parse_expr(), RDB_set_init_value(), and RDB_set_table_name().

RDB_object* RDB_raise_invalid_argument ( const char *  msg,
RDB_exec_context *  ecp 
)
RDB_object* RDB_raise_key_violation ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_lock_not_granted ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

References RDB_raise_err().

RDB_object* RDB_raise_name ( const char *  msg,
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 
)

Convenience function to raise a system-provided error.

Referenced by RDB_array_get(), RDB_array_set(), RDB_drop_constraint(), RDB_drop_db(), RDB_drop_table_index(), RDB_expr_type(), and RDB_map_public_table().

RDB_object* RDB_raise_not_supported ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_add_table(), and RDB_define_subtype().

RDB_object* RDB_raise_operator_not_found ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_call_update_op(), RDB_call_update_op_by_name(), RDB_drop_op(), RDB_get_update_op(), and RDB_get_update_op_by_args().

RDB_object* RDB_raise_predicate_violation ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_create_constraint().

RDB_object* RDB_raise_resource_not_found ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by Duro_dt_execute_path(), and RDB_errno_to_error().

RDB_object* RDB_raise_run_recovery ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_syntax ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_parse_node_expr().

RDB_object* RDB_raise_system ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_errno_to_error(), and RDB_parse_expr().

RDB_object* RDB_raise_type_constraint_violation ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_sum().

RDB_object* RDB_raise_type_mismatch ( const char *  msg,
RDB_exec_context *  ecp 
)
RDB_object* RDB_raise_type_not_found ( const char *  msg,
RDB_exec_context *  ecp 
)

Convenience function to raise a system-provided error.

Referenced by RDB_get_type(), and RDB_irep_to_obj().

RDB_object* RDB_raise_version_mismatch ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

References RDB_raise_err().