DuroDBMS API
1.7
|
Data Structures | |
struct | RDB_renaming |
struct | RDB_wrapping |
struct | chained_obj_getters |
struct | RDB_virtual_attr |
Functions | |
int | RDB_tuple_set (RDB_object *tplp, const char *attrname, const RDB_object *objp, RDB_exec_context *ecp) |
int | RDB_tuple_set_bool (RDB_object *tplp, const char *attrname, RDB_bool val, RDB_exec_context *ecp) |
int | RDB_tuple_set_int (RDB_object *tplp, const char *attrname, RDB_int val, RDB_exec_context *ecp) |
int | RDB_tuple_set_float (RDB_object *tplp, const char *attrname, RDB_float val, RDB_exec_context *ecp) |
int | RDB_tuple_set_string (RDB_object *tplp, const char *attrname, const char *str, RDB_exec_context *ecp) |
RDB_object * | RDB_tuple_get (const RDB_object *tplp, const char *attrname) |
RDB_bool | RDB_tuple_get_bool (const RDB_object *tplp, const char *attrname) |
RDB_int | RDB_tuple_get_int (const RDB_object *tplp, const char *attrname) |
RDB_float | RDB_tuple_get_float (const RDB_object *tplp, const char *attrname) |
char * | RDB_tuple_get_string (const RDB_object *tplp, const char *attrname) |
RDB_int | RDB_tuple_size (const RDB_object *tplp) |
void | RDB_tuple_attr_names (const RDB_object *tplp, char **namev) |
int | RDB_project_tuple (const RDB_object *tplp, int attrc, const char *attrv[], RDB_exec_context *ecp, RDB_object *restplp) |
int | RDB_remove_tuple (const RDB_object *tplp, int attrc, const char *attrv[], RDB_exec_context *ecp, RDB_object *restplp) |
int | RDB_rename_tuple (const RDB_object *tplp, int renc, const RDB_renaming renv[], RDB_exec_context *ecp, RDB_object *restup) |
RDB_bool | RDB_is_tuple (const RDB_object *objp) |
int | RDB_add_tuple (RDB_object *tpl1p, const RDB_object *tpl2p, RDB_exec_context *ecp, RDB_transaction *txp) |
int | RDB_union_tuples (const RDB_object *tpl1p, const RDB_object *tpl2p, RDB_exec_context *ecp, RDB_transaction *txp, RDB_object *restplp) |
int | RDB_extend_tuple (RDB_object *tplp, int attrc, const RDB_virtual_attr attrv[], RDB_getobjfn *getfnp, void *getarg, RDB_exec_context *ecp, RDB_transaction *txp) |
int | RDB_rename_tuple_ex (RDB_object *dtplp, const RDB_object *stplp, const RDB_expression *exp, RDB_exec_context *ecp) |
int | RDB_wrap_tuple (const RDB_object *tplp, int wrapc, const RDB_wrapping wrapv[], RDB_exec_context *ecp, RDB_object *restplp) |
int | RDB_unwrap_tuple (const RDB_object *tplp, int attrc, char *attrv[], RDB_exec_context *ecp, RDB_object *restplp) |
int RDB_extend_tuple | ( | RDB_object * | tplp, |
int | attrc, | ||
const RDB_virtual_attr | attrv[], | ||
RDB_getobjfn * | getfnp, | ||
void * | getarg, | ||
RDB_exec_context * | ecp, | ||
RDB_transaction * | txp | ||
) |
RDB_extend_tuple extends the tuple specified by tplp by the attributes specified by attrc and attrv.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
References RDB_evaluate(), and RDB_init_obj().
RDB_bool RDB_is_tuple | ( | const RDB_object * | objp | ) |
Check if *objp represents a tuple. Calling it with a newly initialized object will return RDB_TRUE.
References RDB_type_is_tuple().
int RDB_project_tuple | ( | const RDB_object * | tplp, |
int | attrc, | ||
const char * | attrv[], | ||
RDB_exec_context * | ecp, | ||
RDB_object * | restplp | ||
) |
RDB_project_tuple creates a tuple which contains only the attributes specified by attrc and attrv.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
int RDB_rename_tuple | ( | const RDB_object * | tplp, |
int | renc, | ||
const RDB_renaming | renv[], | ||
RDB_exec_context * | ecp, | ||
RDB_object * | restup | ||
) |
RDB_rename_tuple creates copies the tuple specified by tplp to the tuple specified by restplp, renaming the attributes specified by renc and renv.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
void RDB_tuple_attr_names | ( | const RDB_object * | tplp, |
char ** | namev | ||
) |
RDB_tuple_attr_names fills namev with pointers to the attribute names of the tuple specified by tplp.
namev must be large enough for all attribute names. The pointers must not be modified by the caller and will become invalid when the tuple is destroyed.
RDB_object* RDB_tuple_get | ( | const RDB_object * | tplp, |
const char * | attrname | ||
) |
RDB_tuple_get returns a pointer to a RDB_object structure which contains the value for attribute name. The value is not copied.
A pointer to the value of the attribute, or NULL if no attribute with that name exists.
Referenced by RDB_obj_matches_type(), RDB_set_init_value(), RDB_tuple_get_bool(), RDB_tuple_get_float(), RDB_tuple_get_int(), RDB_tuple_get_string(), RDB_unwrap_tuple(), and RDB_wrap_tuple().
RDB_bool RDB_tuple_get_bool | ( | const RDB_object * | tplp, |
const char * | attrname | ||
) |
RDB_tuple_get_bool returns the value of attribute name as a RDB_bool. The attribute must exist and it must be of type boolean.
The attribute value.
References RDB_tuple_get().
RDB_float RDB_tuple_get_float | ( | const RDB_object * | tplp, |
const char * | attrname | ||
) |
Return the value of attribute name as a RDB_float. The attribute must exist and it must be of type float.
The attribute value.
References RDB_tuple_get().
RDB_int RDB_tuple_get_int | ( | const RDB_object * | tplp, |
const char * | attrname | ||
) |
RDB_tuple_get_int returns the value of attribute name as a RDB_int. The attribute must exist and it must be of type integer.
The attribute value.
References RDB_tuple_get().
char* RDB_tuple_get_string | ( | const RDB_object * | tplp, |
const char * | attrname | ||
) |
RDB_tuple_get_string returns a pointer to the value of attribute name. The attribute must exist and it must be of type string.
A pointer to the attribute value.
References RDB_tuple_get().
int RDB_tuple_set | ( | RDB_object * | tplp, |
const char * | attrname, | ||
const RDB_object * | objp, | ||
RDB_exec_context * | ecp | ||
) |
RDB_tuple_set sets the attribute name of the tuple variable specified by tplp to the value specified by objp.
If objp is NULL, the attribute value is set to an object that has been initialized using RDB_init_obj().
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
References RDB_copy_obj(), RDB_destroy_obj(), and RDB_init_obj().
Referenced by RDB_set_init_value().
int RDB_tuple_set_bool | ( | RDB_object * | tplp, |
const char * | attrname, | ||
RDB_bool | val, | ||
RDB_exec_context * | ecp | ||
) |
RDB_tuple_set_bool sets the attribute name of the tuple variable specified by tplp to the boolean value specified by val.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
References RDB_bool_to_obj().
int RDB_tuple_set_float | ( | RDB_object * | tplp, |
const char * | attrname, | ||
RDB_float | val, | ||
RDB_exec_context * | ecp | ||
) |
Set the attribute name of the tuple variable specified by tplp to the value specified by val.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
References RDB_float_to_obj().
int RDB_tuple_set_int | ( | RDB_object * | tplp, |
const char * | attrname, | ||
RDB_int | val, | ||
RDB_exec_context * | ecp | ||
) |
RDB_tuple_set_int sets the attribute name of the tuple variable specified by tplp to the integer value specified by val.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
References RDB_int_to_obj().
int RDB_tuple_set_string | ( | RDB_object * | tplp, |
const char * | attrname, | ||
const char * | str, | ||
RDB_exec_context * | ecp | ||
) |
Set the attribute name of the tuple variable specified by tplp to the value specified by str.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.
References RDB_string_to_obj().
RDB_int RDB_tuple_size | ( | const RDB_object * | tplp | ) |
RDB_tuple_size returns the number of attributes of the tuple specified by tplp.
The number of attributes.
Referenced by RDB_obj_matches_type().
int RDB_union_tuples | ( | const RDB_object * | tpl1p, |
const RDB_object * | tpl2p, | ||
RDB_exec_context * | ecp, | ||
RDB_transaction * | txp, | ||
RDB_object * | restplp | ||
) |
RDB_union_tuples creates a tuple which contains the attributes of the two tuples specified by tpl1p and tpl2p.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
References RDB_copy_obj().
int RDB_unwrap_tuple | ( | const RDB_object * | tplp, |
int | attrc, | ||
char * | attrv[], | ||
RDB_exec_context * | ecp, | ||
RDB_object * | restplp | ||
) |
RDB_unwrap_tuple performs a tuple UNWRAP operator on the tuple pointed to by tplp and stores the result in the variable pointed to by restplp.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
References RDB_tuple_get().
int RDB_wrap_tuple | ( | const RDB_object * | tplp, |
int | wrapc, | ||
const RDB_wrapping | wrapv[], | ||
RDB_exec_context * | ecp, | ||
RDB_object * | restplp | ||
) |
RDB_wrap_tuple performs a tuple WRAP operator on the tuple pointed to by tplp and stores the result in the variable pointed to by restplp.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
References RDB_destroy_obj(), RDB_init_obj(), and RDB_tuple_get().