DuroDBMS API  0.17
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_get_property (RDB_exec_context *ecp, const char *name)
void RDB_errcode_to_error (int errcode, RDB_exec_context *ecp, RDB_transaction *txp)
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_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_fatal (RDB_exec_context *ecp)
RDB_object * RDB_raise_syntax (const char *msg, RDB_exec_context *ecp)

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.

void RDB_destroy_exec_context ( RDB_exec_context *  ecp)

RDB_destroy_exec_context frees all resources associated with a RDB_exec_context.

void* RDB_ec_get_property ( RDB_exec_context *  ecp,
const char *  name 
)

RDB_ec_get_property returns 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.

void RDB_errcode_to_error ( int  errcode,
RDB_exec_context *  ecp,
RDB_transaction *  txp 
)

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

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.

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.

RDB_object* RDB_raise_aggregate_undefined ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_deadlock ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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.

RDB_object* RDB_raise_fatal ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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.

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

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_no_memory ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_no_running_tx ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_resource_not_found ( 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.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

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

Convenience function to raise a system-provided error.

RDB_object* RDB_raise_version_mismatch ( RDB_exec_context *  ecp)

Convenience function to raise a system-provided error.