CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include "chartype.h"
#include "error_manager.h"
#include "system_parameter.h"
#include "server_interface.h"
#include "dbtype.h"
#include "work_space.h"
#include "object_domain.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "set_object.h"
#include "class_object.h"
#include "schema_manager.h"
#include "object_accessor.h"
#include "authenticate.h"
#include "db.h"
#include "locator_cl.h"
#include "virtual_object.h"
#include "parser.h"
#include "transaction_cl.h"
#include "trigger_manager.h"
#include "view_transform.h"
#include "network_interface_cl.h"
Go to the source code of this file.
Classes | |
struct | argstate |
Macros | |
#define | OBJ_MAX_ARGS 32 |
#define | MAX_DOMAIN_NAME 128 |
Typedefs | |
typedef struct argstate | ARGSTATE |
Enumerations | |
enum | TEMPOID_FLUSH_RESULT { TEMPOID_FLUSH_FAIL = -1, TEMPOID_FLUSH_OK = 0, TEMPOID_FLUSH_NOT_SUPPORT = 1 } |
Functions | |
static MOP | obj_find_object_by_cons_and_key (MOP classop, SM_CLASS_CONSTRAINT *cons, DB_VALUE *key, AU_FETCHMODE fetchmode) |
static int | find_attribute (SM_CLASS **classp, SM_ATTRIBUTE **attp, MOP op, const char *name, int for_write) |
static int | find_shared_attribute (SM_CLASS **classp, SM_ATTRIBUTE **attp, MOP op, const char *name, int for_write) |
static int | assign_null_value (MOP op, SM_ATTRIBUTE *att, char *mem) |
static int | assign_set_value (MOP op, SM_ATTRIBUTE *att, char *mem, SETREF *setref) |
static int | obj_set_att (MOP op, SM_CLASS *class_, SM_ATTRIBUTE *att, DB_VALUE *value, SM_VALIDATION *valid) |
static int | get_object_value (MOP op, SM_ATTRIBUTE *att, char *mem, DB_VALUE *source, DB_VALUE *dest) |
static int | get_set_value (MOP op, SM_ATTRIBUTE *att, char *mem, DB_VALUE *source, DB_VALUE *dest) |
static int | obj_get_temp (DB_OBJECT *obj, SM_CLASS *class_, SM_ATTRIBUTE *att, DB_VALUE *value) |
static int | obj_set_temp (DB_OBJECT *obj, SM_ATTRIBUTE *att, DB_VALUE *value) |
static void | argstate_from_list (ARGSTATE *state, DB_VALUE_LIST *arglist) |
static void | argstate_from_array (ARGSTATE *state, DB_VALUE **argarray) |
static void | argstate_from_va (ARGSTATE *state, va_list args, int nargs) |
static void | cleanup_argstate (ARGSTATE *state) |
static int | call_method (METHOD_FUNCTION method, MOP obj, DB_VALUE *returnval, int nargs, DB_VALUE **values, DB_VALUE_LIST *overow) |
static int | check_args (SM_METHOD *method, ARGSTATE *state) |
static int | obj_send_method_va (MOP obj, SM_CLASS *class_, SM_METHOD *method, DB_VALUE *returnval, va_list args) |
static int | obj_send_method_list (MOP obj, SM_CLASS *class_, SM_METHOD *method, DB_VALUE *returnval, DB_VALUE_LIST *arglist) |
static int | obj_send_method_array (MOP obj, SM_CLASS *class_, SM_METHOD *method, DB_VALUE *returnval, DB_VALUE **argarray) |
static MOP | find_unique (MOP classop, SM_ATTRIBUTE *att, DB_VALUE *value, AU_FETCHMODE fetchmode) |
static int | flush_temporary_OID (MOP classop, DB_VALUE *key) |
static DB_VALUE * | obj_make_key_value (DB_VALUE *key, const DB_VALUE *values[], int size) |
int | obj_locate_attribute (MOP op, int attid, int for_write, char **memp, SM_ATTRIBUTE **attp) |
int | obj_assign_value (MOP op, SM_ATTRIBUTE *att, char *mem, DB_VALUE *value) |
int | obj_set (MOP op, const char *name, DB_VALUE *value) |
int | obj_desc_set (MOP op, SM_DESCRIPTOR *desc, DB_VALUE *value) |
int | obj_set_shared (MOP op, const char *name, DB_VALUE *value) |
int | obj_get_value (MOP op, SM_ATTRIBUTE *att, void *mem, DB_VALUE *source, DB_VALUE *dest) |
int | obj_get_att (MOP op, SM_CLASS *class_, SM_ATTRIBUTE *att, DB_VALUE *value) |
int | obj_desc_get (MOP op, SM_DESCRIPTOR *desc, DB_VALUE *value) |
int | obj_get (MOP op, const char *name, DB_VALUE *value) |
int | obj_get_shared (MOP op, const char *name, DB_VALUE *value) |
int | obj_get_path (DB_OBJECT *object, const char *attpath, DB_VALUE *value) |
char * | obj_alloc (SM_CLASS *class_, int bound_bit_status) |
MOP | obj_create (MOP classop) |
MOP | obj_create_by_name (const char *name) |
MOP | obj_copy (MOP op) |
void | obj_free_memory (SM_CLASS *class_, MOBJ obj) |
int | obj_delete (MOP op) |
int | obj_send_va (MOP obj, const char *name, DB_VALUE *returnval, va_list args) |
int | obj_desc_send_va (MOP obj, SM_DESCRIPTOR *desc, DB_VALUE *returnval, va_list args) |
int | obj_send_list (MOP obj, const char *name, DB_VALUE *returnval, DB_VALUE_LIST *arglist) |
int | obj_desc_send_list (MOP obj, SM_DESCRIPTOR *desc, DB_VALUE *returnval, DB_VALUE_LIST *arglist) |
int | obj_send_array (MOP obj, const char *name, DB_VALUE *returnval, DB_VALUE **argarray) |
int | obj_desc_send_array (MOP obj, SM_DESCRIPTOR *desc, DB_VALUE *returnval, DB_VALUE **argarray) |
int | obj_desc_send_array_quick (MOP obj, SM_DESCRIPTOR *desc, DB_VALUE *returnval, int nargs, DB_VALUE **argarray) |
MOP | obj_desc_find_unique (MOP op, SM_DESCRIPTOR *desc, DB_VALUE *value, AU_FETCHMODE fetchmode) |
MOP | obj_find_unique (MOP op, const char *attname, DB_VALUE *value, AU_FETCHMODE fetchmode) |
MOP | obj_find_multi_attr (MOP op, int size, const char *attr_names[], const DB_VALUE *values[], AU_FETCHMODE fetchmode) |
MOP | obj_find_multi_desc (MOP op, int size, const SM_DESCRIPTOR *desc[], const DB_VALUE *values[], AU_FETCHMODE fetchmode) |
MOP | obj_find_primary_key (MOP op, const DB_VALUE **values, int size, AU_FETCHMODE fetchmode) |
MOP | obj_find_object_by_pkey (MOP classop, DB_VALUE *key, AU_FETCHMODE fetchmode) |
int | obj_isinstance (MOP obj) |
int | obj_is_instance_of (MOP obj, MOP class_mop) |
int | obj_lock (MOP op, int for_write) |
int | obj_class_lock (MOP op, int for_write) |
int | obj_inst_lock (MOP op, int for_write) |
Variables | |
char * | obj_Method_error_msg |
static int | forge_flag_pat = 0 |
static int | obj_Method_call_level = 0 |
#define MAX_DOMAIN_NAME 128 |
Definition at line 72 of file object_accessor.c.
Referenced by check_args().
#define OBJ_MAX_ARGS 32 |
Definition at line 71 of file object_accessor.c.
Referenced by argstate_from_array(), argstate_from_list(), argstate_from_va(), obj_desc_send_array_quick(), obj_send_method_array(), obj_send_method_list(), and obj_send_method_va().
enum TEMPOID_FLUSH_RESULT |
Enumerator | |
---|---|
TEMPOID_FLUSH_FAIL | |
TEMPOID_FLUSH_OK | |
TEMPOID_FLUSH_NOT_SUPPORT |
Definition at line 74 of file object_accessor.c.
Definition at line 2310 of file object_accessor.c.
References argstate::free_overflow, i, argstate::nargs, argstate::noverflow, NULL, OBJ_MAX_ARGS, argstate::overflow, argstate::save, argstate::save_overflow, and argstate::values.
Referenced by obj_send_method_array().
|
static |
Definition at line 2280 of file object_accessor.c.
References argstate::free_overflow, i, argstate::nargs, db_value_list::next, argstate::noverflow, NULL, OBJ_MAX_ARGS, argstate::overflow, argstate::save, argstate::save_overflow, db_value_list::val, and argstate::values.
Referenced by obj_send_method_list().
|
static |
Definition at line 2348 of file object_accessor.c.
References argstate::free_overflow, i, argstate::nargs, argstate::noverflow, NULL, OBJ_MAX_ARGS, argstate::overflow, argstate::save, argstate::save_overflow, and argstate::values.
Referenced by obj_send_method_va().
|
static |
Definition at line 457 of file object_accessor.c.
References assert, sm_attribute::default_value, sm_attribute::domain, er_errid(), ER_OBJ_INVALID_ARGUMENTS, NO_ERROR, NULL, OBJ_CLEAR_BOUND_BIT, pr_clear_value(), pr_type::setmem(), sm_attribute::storage_order, tp_domain::type, sm_default_value::value, pr_type::variable_p, ws_find(), and WS_FIND_MOP_DELETED.
Referenced by obj_assign_value().
|
static |
Definition at line 512 of file object_accessor.c.
References assert, DB_FETCH_WRITE, db_get_set(), db_make_multiset(), db_make_null(), db_make_sequence(), db_make_set(), DB_TYPE_MULTISET, DB_TYPE_SEQUENCE, DB_TYPE_SET, db_value_put_null(), sm_attribute::default_value, sm_attribute::domain, er_errid(), error(), sm_attribute::id, is_class(), locator_is_class(), NO_ERROR, NULL, db_set::ref_count, set_change_owner(), set_disconnect(), set_free(), pr_type::setmem(), TP_DOMAIN_TYPE, tp_domain::type, sm_default_value::value, and ws_class_mop().
Referenced by obj_assign_value().
|
static |
Definition at line 2421 of file object_accessor.c.
References ARG_FILE_LINE, db_get_error(), db_make_null(), DB_TYPE_ERROR, DB_VALUE_TYPE, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_METHOD_USER_ERROR, er_set(), error(), forge_flag_pat, free_and_init, NO_ERROR, NULL, obj_Method_call_level, and obj_Method_error_msg.
Referenced by obj_desc_send_array_quick(), obj_send_method_array(), obj_send_method_list(), and obj_send_method_va().
|
static |
Definition at line 2654 of file object_accessor.c.
References ARG_FILE_LINE, sm_method_signature::args, assert, sm_method_argument::domain, DOMAIN_COMPATIBLE, DOMAIN_ERROR, DOMAIN_INCOMPATIBLE, DOMAIN_OVERFLOW, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_ARGUMENT_DOMAIN_CONFLICT, er_set(), error(), sm_method::header, i, sm_method_argument::index, MAX_DOMAIN_NAME, sm_component::name, argstate::nargs, db_value::need_clear, sm_method_argument::next, NO_ERROR, NULL, pr_free_ext_value(), pr_make_ext_value(), argstate::save, sm_method::signatures, tp_domain_name(), tp_domain_select(), TP_EXACT_MATCH, TP_STR_MATCH, tp_value_cast(), tp_value_coerce(), tp_value_domain_name(), and argstate::values.
Referenced by obj_send_method_array(), obj_send_method_list(), and obj_send_method_va().
|
static |
Definition at line 2380 of file object_accessor.c.
References i, argstate::nargs, NULL, pr_free_ext_value(), argstate::save, and argstate::values.
Referenced by obj_send_method_array(), obj_send_method_list(), and obj_send_method_va().
|
static |
Definition at line 167 of file object_accessor.c.
References AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, classobj_find_attribute(), DB_FETCH_READ, DB_FETCH_WRITE, ER_OBJ_INVALID_ATTRIBUTE, error(), ERROR1, sm_attribute::header, ID_SHARED_ATTRIBUTE, is_class(), db_object::is_temp, locator_is_class(), sm_component::name_space, NO_ERROR, and NULL.
Referenced by obj_get(), and obj_set().
|
static |
Definition at line 264 of file object_accessor.c.
References AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, classobj_find_attribute(), ER_OBJ_INVALID_ATTRIBUTE, error(), ERROR1, sm_attribute::header, ID_SHARED_ATTRIBUTE, sm_component::name_space, NO_ERROR, NULL, ws_class_has_object_dependencies(), and ws_class_mop().
Referenced by obj_get_shared(), and obj_set_shared().
|
static |
Definition at line 3366 of file object_accessor.c.
References ARG_FILE_LINE, au_fetch_instance_force(), BTID_SET_NULL, btree_find_unique(), BTREE_KEY_FOUND, classobj_get_cached_constraint(), sm_attribute::constraints, DB_TYPE_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, er_errid(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, ER_OBJ_INDEX_NOT_FOUND, ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, flush_temporary_OID(), LC_FETCH_DIRTY_VERSION, NO_ERROR, NULL, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, sm_flush_objects(), TEMPOID_FLUSH_FAIL, TEMPOID_FLUSH_NOT_SUPPORT, TM_TRAN_ASYNC_WS, ws_mop(), and ws_oid().
Referenced by obj_desc_find_unique(), and obj_find_unique().
Definition at line 3498 of file object_accessor.c.
References db_get_object(), NO_ERROR, NULL, OID_ISTEMP, sm_flush_objects(), TEMPOID_FLUSH_FAIL, TEMPOID_FLUSH_NOT_SUPPORT, TEMPOID_FLUSH_OK, TM_TRAN_ASYNC_WS, WS_ISVID, and WS_OID.
Referenced by find_unique(), and obj_find_object_by_cons_and_key().
|
static |
Definition at line 1071 of file object_accessor.c.
References ASSERT_ERROR_AND_SET, au_fetch_instance(), AU_FETCH_READ, AU_SELECT, DB_FETCH_READ, db_get_object(), db_make_null(), db_make_object(), DB_VALUE_TYPE, sm_attribute::default_value, sm_attribute::domain, pr_type::getmem(), LC_DOESNOT_EXIST, LC_ERROR, locator_does_exist_object(), NO_ERROR, NULL, OBJ_CLEAR_BOUND_BIT, db_object::object, rc, pr_type::setmem(), sm_attribute::storage_order, TM_TRAN_READ_FETCH_VERSION, TP_DOMAIN_TYPE, tp_domain::type, sm_default_value::value, vid_inhibit_null_check, WS_IS_DELETED, WS_ISVID, and WS_SET_DELETED.
Referenced by obj_get_value().
|
static |
Definition at line 1195 of file object_accessor.c.
References ARG_FILE_LINE, assert, DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, DB_FETCH_READ, db_get_set(), db_make_multiset(), db_make_null(), db_make_sequence(), db_make_set(), DB_TYPE_MULTISET, DB_TYPE_SEQUENCE, DB_TYPE_SET, db_value_domain_init(), db_value_put_null(), DB_VALUE_TYPE, sm_attribute::default_value, sm_attribute::domain, er_errid(), ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, pr_type::getmem(), sm_attribute::id, is_class(), locator_is_class(), NO_ERROR, NULL, set_connect(), TP_DOMAIN_TYPE, tp_domain::type, sm_default_value::value, ws_class_mop(), and ws_is_same_object().
Referenced by obj_get_value().
char* obj_alloc | ( | SM_CLASS * | class_, |
int | bound_bit_status | ||
) |
Definition at line 1863 of file object_accessor.c.
References sm_class::attributes, ws_object_header::chn, db_ws_alloc(), sm_attribute::domain, sm_class::fixed_count, sm_attribute::header, i, pr_type::initmem(), sm_component::next, NULL, NULL_CHN, OBJ_HEADER_BOUND_BITS_OFFSET, sm_class::object_size, sm_attribute::offset, OR_BOUND_BIT_WORDS, and tp_domain::type.
Referenced by create_template_object(), get_current(), get_old(), and vid_build_non_upd_object().
int obj_assign_value | ( | MOP | op, |
SM_ATTRIBUTE * | att, | ||
char * | mem, | ||
DB_VALUE * | value | ||
) |
Definition at line 645 of file object_accessor.c.
References ARG_FILE_LINE, assign_null_value(), assign_set_value(), db_get_object(), db_get_set(), DB_IS_NULL, sm_attribute::default_value, sm_attribute::domain, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), db_object::is_vid, NO_ERROR, NULL, OBJ_SET_BOUND_BIT, pr_clear_value(), pr_clone_value(), pr_type::setmem(), sm_attribute::storage_order, TP_DOMAIN_TYPE, TP_IS_SET_TYPE, tp_Type_object, tp_domain::type, sm_default_value::value, pr_type::variable_p, ws_find(), WS_FIND_MOP_DELETED, and WS_MOP_IS_NULL.
Referenced by obj_set_att(), obj_set_shared(), obt_apply_assignment(), and vid_build_non_upd_object().
int obj_class_lock | ( | MOP | op, |
int | for_write | ||
) |
Definition at line 4387 of file object_accessor.c.
References AU_ALTER, au_fetch_class(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, error(), db_object::is_temp, NO_ERROR, and NULL.
Referenced by obj_lock().
Definition at line 1983 of file object_accessor.c.
References ARG_FILE_LINE, sm_class::attributes, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_INSERT, AU_SELECT, DB_FETCH_CLREAD_INSTWRITE, db_make_null(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), error(), sm_attribute::header, is_class(), locator_is_class(), sm_component::next, NO_ERROR, NULL, obj_get_att(), obt_assign(), obt_def_object(), obt_quit(), obt_update_internal(), pr_clear_value(), TM_TRAN_READ_FETCH_VERSION, and ws_class_mop().
Referenced by db_copy().
Definition at line 1921 of file object_accessor.c.
References NULL, obt_def_object(), obt_quit(), and obt_update_internal().
Referenced by au_install(), au_make_user(), au_set_password_internal(), db_create_internal(), and obj_create_by_name().
Definition at line 1949 of file object_accessor.c.
References NULL, obj_create(), and sm_find_class().
Referenced by db_create_by_name_internal().
int obj_delete | ( | MOP | op | ) |
Definition at line 2090 of file object_accessor.c.
References AU_DELETE, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, sm_class::class_type, DB_FETCH_WRITE, db_object::decached, ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, is_class(), db_object::is_vid, LC_FETCH_MVCC_VERSION, locator_is_class(), locator_remove_instance(), NO_ERROR, NULL, SM_VCLASS_CT, tr_after_object(), tr_before_object(), TR_EVENT_DELETE, tr_prepare_class(), sm_class::triggers, vid_get_referenced_mop(), vid_rem_instance(), ws_class_mop(), and ws_pin().
Referenced by au_delete_new_auth(), au_drop_user(), au_install(), au_make_user(), db_drop(), dbt_drop_attribute(), do_change_att_schema_only(), drop_stored_procedure(), jsp_add_stored_procedure(), jsp_add_stored_procedure_argument(), res_delete_row_internal(), and sm_delete_class_mop().
MOP obj_desc_find_unique | ( | MOP | op, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | value, | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 3539 of file object_accessor.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), find_unique(), NO_ERROR, NULL, and sm_get_descriptor_component().
Referenced by db_dfind_unique().
int obj_desc_get | ( | MOP | op, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | value | ||
) |
Definition at line 1470 of file object_accessor.c.
References assert, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obj_get_att(), and sm_get_descriptor_component().
Referenced by db_dget().
int obj_desc_send_array | ( | MOP | obj, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | returnval, | ||
DB_VALUE ** | argarray | ||
) |
Definition at line 3254 of file object_accessor.c.
References ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obj_send_method_array(), and sm_get_descriptor_component().
Referenced by db_dsend_argarray().
int obj_desc_send_array_quick | ( | MOP | obj, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | returnval, | ||
int | nargs, | ||
DB_VALUE ** | argarray | ||
) |
Definition at line 3294 of file object_accessor.c.
References call_method(), ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_TOO_MANY_ARGUMENTS, error(), ERROR0, ERROR3, sm_method::function, sm_method::header, sm_component::name, NO_ERROR, NULL, OBJ_MAX_ARGS, sm_get_descriptor_component(), and sm_link_method().
Referenced by db_dsend_quick().
int obj_desc_send_list | ( | MOP | obj, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | returnval, | ||
DB_VALUE_LIST * | arglist | ||
) |
Definition at line 3105 of file object_accessor.c.
References ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obj_send_method_list(), and sm_get_descriptor_component().
Referenced by db_dsend_arglist().
int obj_desc_send_va | ( | MOP | obj, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | returnval, | ||
va_list | args | ||
) |
Definition at line 2882 of file object_accessor.c.
References ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obj_desc_send_va(), obj_send_method_va(), obj_send_va(), and sm_get_descriptor_component().
Referenced by db_dsend(), and obj_desc_send_va().
int obj_desc_set | ( | MOP | op, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | value | ||
) |
Definition at line 967 of file object_accessor.c.
References assert, DB_TYPE_LAST, DB_VALUE_TYPE, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obj_set_att(), sm_get_descriptor_component(), and sm_descriptor::valid.
Referenced by db_dput_internal(), and ldr_generic().
MOP obj_find_multi_attr | ( | MOP | op, |
int | size, | ||
const char * | attr_names[], | ||
const DB_VALUE * | values[], | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 3676 of file object_accessor.c.
References ARG_FILE_LINE, sm_class_constraint::attributes, au_fetch_class(), AU_FETCH_READ, AU_SELECT, sm_class::constraints, db_make_null(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, i, sm_class_constraint::next, NO_ERROR, NULL, obj_find_object_by_cons_and_key(), obj_make_key_value(), pr_clear_value(), SM_COMPARE_NAMES, sm_flush_objects(), SM_IS_CONSTRAINT_INDEX_FAMILY, TM_TRAN_ASYNC_WS, and sm_class_constraint::type.
Referenced by db_find_multi_unique().
MOP obj_find_multi_desc | ( | MOP | op, |
int | size, | ||
const SM_DESCRIPTOR * | desc[], | ||
const DB_VALUE * | values[], | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 3761 of file object_accessor.c.
References ARG_FILE_LINE, sm_class_constraint::attributes, au_fetch_class(), AU_FETCH_READ, AU_SELECT, sm_class::constraints, db_make_null(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, free_and_init, i, sm_attribute::id, sm_class_constraint::next, NO_ERROR, NULL, obj_find_object_by_cons_and_key(), obj_make_key_value(), pr_clear_value(), sm_flush_objects(), sm_get_descriptor_component(), SM_IS_CONSTRAINT_INDEX_FAMILY, TM_TRAN_ASYNC_WS, and sm_class_constraint::type.
Referenced by db_dfind_multi_unique().
|
static |
Definition at line 3887 of file object_accessor.c.
References ARG_FILE_LINE, sm_class_constraint::attributes, au_fetch_instance_force(), btree_find_unique(), BTREE_KEY_FOUND, db_get_set(), DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_VALUE_TYPE, ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, error(), flush_temporary_OID(), i, sm_class_constraint::index_btid, LC_FETCH_DIRTY_VERSION, NO_ERROR, NULL, pr_clear_value(), set_get_element(), TEMPOID_FLUSH_FAIL, TEMPOID_FLUSH_NOT_SUPPORT, TP_ANY_MATCH, tp_domain_select(), ws_mop(), and ws_oid().
Referenced by obj_find_multi_attr(), and obj_find_multi_desc().
MOP obj_find_object_by_pkey | ( | MOP | classop, |
DB_VALUE * | key, | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 4084 of file object_accessor.c.
References ARG_FILE_LINE, assert, au_fetch_class(), au_fetch_instance_force(), AU_FETCH_READ, AU_SELECT, btree_find_unique(), BTREE_KEY_FOUND, classobj_find_class_primary_key(), DB_FETCH_READ, db_get_object(), DB_TYPE_MIDXKEY, DB_TYPE_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, sm_class_constraint::index_btid, is_class(), LC_DOESNOT_EXIST, LC_ERROR, LC_FETCH_DIRTY_VERSION, locator_does_exist_object(), locator_is_class(), NO_ERROR, NULL, OID_ISTEMP, sm_flush_objects(), TM_TRAN_ASYNC_WS, WS_IS_DELETED, WS_ISVID, ws_mop(), WS_OID, ws_oid(), and WS_SET_DELETED.
Referenced by obj_find_primary_key().
MOP obj_find_primary_key | ( | MOP | op, |
const DB_VALUE ** | values, | ||
int | size, | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 4022 of file object_accessor.c.
References ARG_FILE_LINE, db_make_sequence(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, i, NO_ERROR, NULL, obj_find_object_by_pkey(), set_create_sequence(), set_free(), and set_put_element().
Referenced by db_find_primary_key().
MOP obj_find_unique | ( | MOP | op, |
const char * | attname, | ||
DB_VALUE * | value, | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 3577 of file object_accessor.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, classobj_find_attribute(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_INVALID_ATTRIBUTE, er_set(), ER_WARNING_SEVERITY, find_unique(), NO_ERROR, and NULL.
Referenced by au_find_user(), au_find_user_to_drop(), au_set_new_auth(), db_find_unique(), and db_find_unique_write_mode().
Definition at line 2064 of file object_accessor.c.
References sm_class::attributes, db_ws_free(), sm_attribute::domain, pr_type::freemem(), sm_attribute::header, sm_component::next, NULL, sm_attribute::offset, and tp_domain::type.
Referenced by tf_disk_to_mem(), vid_build_non_upd_object(), ws_cache(), and ws_decache().
Definition at line 1508 of file object_accessor.c.
References ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, find_attribute(), NO_ERROR, NULL, and obj_get_att().
Referenced by au_drop_user(), au_dump_to_file(), au_dump_user(), au_export_users(), au_force_write_new_auth(), au_get_new_auth(), au_get_object(), au_get_set(), au_get_user_name(), au_perform_login(), au_print_auth(), au_print_grant_entry(), au_set_password_internal(), au_user_name(), db_object_fetch(), find_all_triggers(), get_grants(), get_user_trigger_objects(), obj_get_path(), register_user_trigger(), tr_dump_selective_triggers(), tr_get_class_name(), tr_status_as_string(), tr_update_user_cache(), trigger_table_add(), trigger_table_drop(), trigger_table_find(), trigger_table_rename(), and unregister_user_trigger().
int obj_get_att | ( | MOP | op, |
SM_CLASS * | class_, | ||
SM_ATTRIBUTE * | att, | ||
DB_VALUE * | value | ||
) |
Definition at line 1387 of file object_accessor.c.
References ARG_FILE_LINE, assert, au_fetch_class_force(), au_fetch_instance_force(), AU_FETCH_READ, sm_class::class_type, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, er_set(), error(), sm_attribute::header, ID_ATTRIBUTE, db_object::is_temp, db_object::is_vid, mq_get_attribute(), sm_component::name, sm_component::name_space, NO_ERROR, NULL, obj_get_temp(), obj_get_value(), sm_attribute::offset, SM_VCLASS_CT, TM_TRAN_READ_FETCH_VERSION, vid_get_referenced_mop(), vid_is_updatable(), ws_class_mop(), ws_pin_instance_and_class(), and ws_restore_pin().
Referenced by obj_copy(), obj_desc_get(), obj_get(), and obj_get_temp().
Definition at line 1588 of file object_accessor.c.
References char_isdigit(), char_isspace(), db_get_object(), db_get_set(), db_make_object(), db_seq_get(), db_set_get(), DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_VALUE_TYPE, ER_OBJ_INVALID_INDEX_IN_PATH, ER_OBJ_INVALID_OBJECT_IN_PATH, ER_OBJ_INVALID_PATH_EXPRESSION, ER_OBJ_INVALID_SET_IN_PATH, error(), ERROR0, NO_ERROR, obj_get(), and TP_IS_SET_TYPE.
Referenced by db_get().
Definition at line 1549 of file object_accessor.c.
References ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, find_shared_attribute(), NO_ERROR, NULL, and obj_get_value().
Referenced by db_get_shared().
|
static |
Definition at line 1724 of file object_accessor.c.
References obj_template::assignments, db_object::class_mop, db_make_null(), ER_OBJ_INVALID_TEMP_OBJECT, error(), ERROR0, obj_template::is_old_template, NO_ERROR, NULL, obj_get_att(), obj_get_value(), db_object::object, OBT_BASE_OBJECT, obj_tempassign::old_value, sm_attribute::order, and obj_tempassign::variable.
Referenced by obj_get_att().
int obj_get_value | ( | MOP | op, |
SM_ATTRIBUTE * | att, | ||
void * | mem, | ||
DB_VALUE * | source, | ||
DB_VALUE * | dest | ||
) |
Definition at line 1307 of file object_accessor.c.
References ARG_FILE_LINE, db_get_string(), db_make_null(), DB_TYPE_STRING, DB_VALUE_TYPE, sm_attribute::default_value, sm_attribute::domain, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), get_object_value(), get_set_value(), pr_type::getmem(), NO_ERROR, NULL, OBJ_GET_BOUND_BIT, pr_clone_value(), sm_attribute::storage_order, TP_DOMAIN_TYPE, TP_IS_SET_TYPE, tp_Type_object, tp_domain::type, sm_default_value::value, pr_type::variable_p, ws_find(), and WS_FIND_MOP_DELETED.
Referenced by obj_get_att(), obj_get_shared(), obj_get_temp(), and obt_apply_assignments().
int obj_inst_lock | ( | MOP | op, |
int | for_write | ||
) |
Definition at line 4418 of file object_accessor.c.
References ARG_FILE_LINE, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, AU_UPDATE, classobj_find_attribute(), sm_attribute::constraints, ER_OBJ_INVALID_ATTRIBUTE, er_set(), ER_WARNING_SEVERITY, error(), sm_constraint::index, db_object::is_temp, LC_FETCH_DIRTY_VERSION, LC_FETCH_MVCC_VERSION, sm_constraint::next, NO_ERROR, NULL, SM_IS_CONSTRAINT_UNIQUE_FAMILY, and sm_constraint::type.
Referenced by au_add_member_internal(), au_delete_new_auth(), au_drop_member(), au_grant(), au_revoke(), au_update_new_auth(), obj_lock(), propagate_revoke(), register_user_trigger(), trigger_table_add(), trigger_table_drop(), trigger_table_rename(), unregister_user_trigger(), and update_object_by_oid().
Definition at line 4305 of file object_accessor.c.
References au_fetch_instance(), AU_FETCH_READ, AU_SELECT, NO_ERROR, NULL, TM_TRAN_READ_FETCH_VERSION, and ws_class_mop().
Referenced by db_is_instance_of().
int obj_isinstance | ( | MOP | obj | ) |
Definition at line 4235 of file object_accessor.c.
References ASSERT_ERROR_AND_SET, au_fetch_instance(), AU_FETCH_READ, AU_SELECT, DB_FETCH_READ, db_object::is_temp, LC_DOESNOT_EXIST, LC_ERROR, locator_does_exist_object(), locator_is_class(), NO_ERROR, NULL, TM_TRAN_READ_FETCH_VERSION, WS_IS_DELETED, WS_ISVID, and WS_SET_DELETED.
Referenced by db_is_instance().
int obj_locate_attribute | ( | MOP | op, |
int | attid, | ||
int | for_write, | ||
char ** | memp, | ||
SM_ATTRIBUTE ** | attp | ||
) |
Definition at line 321 of file object_accessor.c.
References sm_class::attributes, AU_ALTER, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_SELECT, AU_UPDATE, sm_class::class_attributes, DB_FETCH_READ, DB_FETCH_WRITE, ER_OBJ_INVALID_ATTRIBUTE, ER_OBJ_INVALID_TEMP_OBJECT, error(), ERROR0, ERROR1, sm_attribute::header, sm_attribute::id, is_class(), db_object::is_temp, LC_FETCH_MVCC_VERSION, locator_is_class(), sm_component::next, NO_ERROR, NULL, sm_attribute::offset, sm_class::shared, TM_TRAN_READ_FETCH_VERSION, ws_class_has_object_dependencies(), and ws_class_mop().
Referenced by set_get_setobj().
int obj_lock | ( | MOP | op, |
int | for_write | ||
) |
Definition at line 4351 of file object_accessor.c.
References DB_FETCH_CLREAD_INSTREAD, DB_FETCH_CLREAD_INSTWRITE, is_class(), db_object::is_temp, locator_is_class(), NO_ERROR, obj_class_lock(), and obj_inst_lock().
Referenced by db_is_deleted(), db_lock_read(), db_lock_write(), set_add_element(), set_convert_oids_to_objects(), set_drop_element(), set_drop_seq_element(), set_insert_element(), and set_put_element().
Definition at line 3614 of file object_accessor.c.
References ARG_FILE_LINE, DB_IS_NULL, db_make_sequence(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), i, NO_ERROR, NULL, set_create_sequence(), set_free(), and set_put_element().
Referenced by obj_find_multi_attr(), and obj_find_multi_desc().
Definition at line 3211 of file object_accessor.c.
References AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, classobj_find_method(), ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_INVALID_METHOD, error(), ERROR0, ERROR1, IS_CLASS_MOP, NO_ERROR, NULL, and obj_send_method_array().
Referenced by db_send_argarray(), method_invoke_for_server(), and method_receive_results_for_stand_alone().
int obj_send_list | ( | MOP | obj, |
const char * | name, | ||
DB_VALUE * | returnval, | ||
DB_VALUE_LIST * | arglist | ||
) |
Definition at line 3043 of file object_accessor.c.
References AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, classobj_find_method(), ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_INVALID_METHOD, error(), ERROR0, ERROR1, IS_CLASS_MOP, NO_ERROR, NULL, obj_send_list(), and obj_send_method_list().
Referenced by db_send_arglist(), and obj_send_list().
|
static |
Definition at line 3142 of file object_accessor.c.
References sm_method_signature::args, argstate_from_array(), call_method(), check_args(), cleanup_argstate(), ER_OBJ_TOO_MANY_ARGUMENTS, error(), ERROR3, sm_method::function, sm_method::header, sm_component::name, argstate::nargs, NO_ERROR, argstate::noverflow, NULL, sm_method_signature::num_args, OBJ_MAX_ARGS, argstate::overflow, sm_method::signatures, sm_link_method(), and argstate::values.
Referenced by obj_desc_send_array(), and obj_send_array().
|
static |
Definition at line 2974 of file object_accessor.c.
References sm_method_signature::args, argstate_from_list(), call_method(), check_args(), cleanup_argstate(), ER_OBJ_TOO_MANY_ARGUMENTS, error(), ERROR3, sm_method::function, sm_method::header, sm_component::name, argstate::nargs, NO_ERROR, argstate::noverflow, NULL, sm_method_signature::num_args, OBJ_MAX_ARGS, argstate::overflow, sm_method::signatures, sm_link_method(), and argstate::values.
Referenced by obj_desc_send_list(), and obj_send_list().
|
static |
Definition at line 2783 of file object_accessor.c.
References sm_method_signature::args, argstate_from_va(), call_method(), check_args(), cleanup_argstate(), ER_OBJ_TOO_MANY_ARGUMENTS, error(), ERROR3, sm_method::function, sm_method::header, sm_component::name, argstate::nargs, NO_ERROR, argstate::noverflow, NULL, sm_method_signature::num_args, OBJ_MAX_ARGS, argstate::overflow, sm_method::signatures, sm_link_method(), and argstate::values.
Referenced by obj_desc_send_va(), and obj_send_va().
Definition at line 2838 of file object_accessor.c.
References AU_EXECUTE, au_fetch_class(), AU_FETCH_READ, classobj_find_method(), ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_INVALID_METHOD, error(), ERROR0, ERROR1, IS_CLASS_MOP, NO_ERROR, NULL, and obj_send_method_va().
Referenced by db_send(), and obj_desc_send_va().
Definition at line 931 of file object_accessor.c.
References DB_TYPE_LAST, DB_VALUE_TYPE, ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, find_attribute(), NO_ERROR, NULL, and obj_set_att().
Referenced by au_change_sp_owner(), au_change_trigger_owner(), au_compute_groups(), au_drop_user(), au_make_user(), au_set_new_auth(), au_set_password_internal(), au_set_user_comment(), db_put_internal(), jsp_alter_stored_procedure(), ldr_class_attr_db_generic(), obj_set_att(), register_user_trigger(), rs_set_db_value(), tr_get_class_name(), and trigger_table_add().
|
static |
Definition at line 721 of file object_accessor.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_fetch_instance(), au_fetch_instance_force(), AU_FETCH_UPDATE, AU_UPDATE, sm_class::class_type, classobj_has_unique_constraint(), sm_attribute::constraints, DB_AUTH_UPDATE, DB_FETCH_WRITE, db_is_updatable_attribute(), db_make_null(), er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_IT_ATTR_NOT_UPDATABLE, ER_IT_NOT_UPDATABLE_STMT, er_set(), error(), sm_attribute::header, ID_ATTRIBUTE, is_class(), db_object::is_temp, db_object::is_vid, LC_FETCH_MVCC_VERSION, locator_is_class(), mq_update_attribute(), sm_component::name, sm_component::name_space, NO_ERROR, NULL, obj_assign_value(), obj_set(), obj_set_temp(), obt_assign(), obt_check_assignment(), obt_edit_object(), obt_quit(), obt_update(), sm_attribute::offset, pr_free_ext_value(), argstate::save, sm_active_triggers(), SM_VCLASS_CT, TR_EVENT_ALL, sm_class::triggers, vid_get_referenced_mop(), vid_is_updatable(), ws_class_has_object_dependencies(), ws_class_mop(), ws_pin_instance_and_class(), and ws_restore_pin().
Referenced by obj_desc_set(), and obj_set().
Definition at line 1012 of file object_accessor.c.
References assert, DB_TYPE_LAST, DB_VALUE_TYPE, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, find_shared_attribute(), NO_ERROR, NULL, obj_assign_value(), obt_check_assignment(), and pr_free_ext_value().
Referenced by insert_object_attr(), ldr_class_attr_db_generic(), and update_object_attribute().
|
static |
Definition at line 1809 of file object_accessor.c.
References db_object::class_mop, ER_OBJ_INVALID_TEMP_OBJECT, error(), ERROR0, obj_template::is_old_template, NO_ERROR, NULL, db_object::object, and obt_assign().
Referenced by obj_set_att().
|
static |
Definition at line 108 of file object_accessor.c.
Referenced by call_method().
|
static |
Definition at line 109 of file object_accessor.c.
Referenced by call_method().
char* obj_Method_error_msg |
Definition at line 106 of file object_accessor.c.
Referenced by call_method().