static OID * cursor_get_oid_from_vobj (OID * current_oid_p, int length) { char *vobject_p; OR_BUF buffer; DB_VALUE value; DB_OBJECT *object_p, *tmp_object_p; vobject_p = (char *) current_oid_p; current_oid_p = NULL; or_init (&buffer, vobject_p, length); DB_MAKE_NULL (&value); if (cursor_copy_vobj_to_dbvalue (&buffer, &value) == NO_ERROR) { tmp_object_p = DB_GET_OBJECT (&value); if (vid_is_updatable (tmp_object_p) == true) { object_p = vid_base_instance (tmp_object_p); if (object_p && !WS_ISVID (object_p)) { current_oid_p = WS_OID (object_p); } } } return current_oid_p; }
/* * xsession_get_last_insert_id () - retrieve the value of the last insert id * * return : error code * thread_p (in) : worker thread * value (out) : the value of last insert id * update_last_insert_id(in): whether update the last insert id */ int xsession_get_last_insert_id (THREAD_ENTRY * thread_p, DB_VALUE * value, bool update_last_insert_id) { int err = NO_ERROR; assert (value != NULL); err = session_get_last_insert_id (thread_p, value, update_last_insert_id); if (err != NO_ERROR) { DB_MAKE_NULL (value); } return err; }
/* * db_col_drop_nulls() - This function is used to remove all NULL db_values * from a collection. * return : error code * col(in): collection */ int db_col_drop_nulls (DB_COLLECTION * col) { int error; DB_VALUE value; CHECK_CONNECT_ERROR (); CHECK_1ARG_ERROR (col); /* Check if modifications are disabled only if the set is owned */ if (col->owner != NULL) { CHECK_MODIFICATION_ERROR (); } DB_MAKE_NULL (&value); error = set_drop_element (col, &value, true); return error; }