CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <assert.h>
#include "authenticate.h"
#include "system_parameter.h"
#include "storage_common.h"
#include "db.h"
#include "class_object.h"
#include "object_print.h"
#include "server_interface.h"
#include "boot_cl.h"
#include "locator_cl.h"
#include "schema_manager.h"
#include "schema_template.h"
#include "object_accessor.h"
#include "object_primitive.h"
#include "set_object.h"
#include "virtual_object.h"
#include "parser.h"
#include "view_transform.h"
Go to the source code of this file.
Macros | |
#define | ERROR_SET(error, code) |
Functions | |
void | db_namelist_free (DB_NAMELIST *list) |
int | db_namelist_add (DB_NAMELIST **list, const char *name) |
int | db_namelist_append (DB_NAMELIST **list, const char *name) |
DB_OBJECT * | db_create_vclass (const char *name) |
char * | db_get_vclass_ldb_name (DB_OBJECT *op) |
int | db_is_real_instance (DB_OBJECT *obj) |
DB_OBJECT * | db_real_instance (DB_OBJECT *obj) |
int | db_instance_equal (DB_OBJECT *obj1, DB_OBJECT *obj2) |
int | db_is_updatable_object (DB_OBJECT *obj) |
int | db_is_updatable_attribute (DB_OBJECT *obj, const char *attr_name) |
int | db_add_query_spec (MOP vclass, const char *query) |
int | db_drop_query_spec (DB_OBJECT *vclass, const int query_no) |
int | db_change_query_spec (DB_OBJECT *vclass, const char *new_query, const int query_no) |
DB_QUERY_SPEC * | db_get_query_specs (DB_OBJECT *obj) |
DB_QUERY_SPEC * | db_query_spec_next (DB_QUERY_SPEC *query_spec) |
const char * | db_query_spec_string (DB_QUERY_SPEC *query_spec) |
DB_NAMELIST * | db_get_object_id (MOP vclass) |
int | db_is_vclass (DB_OBJECT *op) |
#define ERROR_SET | ( | error, | |
code | |||
) |
Definition at line 51 of file db_virt.c.
Referenced by db_add_query_spec(), db_change_query_spec(), db_drop_query_spec(), db_is_updatable_attribute(), and db_is_updatable_object().
Definition at line 458 of file db_virt.c.
References assert, AU_ALTER, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR_SET, NO_ERROR, NULL, sm_update_class(), smt_add_query_spec(), smt_edit_class_mop(), and smt_quit().
Referenced by boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), and boot_define_view_vclass().
Definition at line 558 of file db_virt.c.
References assert, AU_ALTER, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR_SET, NO_ERROR, NULL, sm_update_class(), smt_change_query_spec(), smt_edit_class_mop(), and smt_quit().
Definition at line 140 of file db_virt.c.
References ARG_FILE_LINE, assert, assert_release, CHECK_CONNECT_NULL, CHECK_MODIFICATION_NULL, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_CLASS_WITH_PRIM_NAME, error(), LC_CLASSNAME_RESERVED, locator_reserve_class_name(), sm_template::name, NO_ERROR, NULL, OID_INITIALIZER, pr_find_type(), pt_is_reserved_word(), sm_update_class(), SM_VCLASS_CT, smt_def_typed_class(), and smt_quit().
Referenced by boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), and boot_define_view_vclass().
Definition at line 507 of file db_virt.c.
References assert, AU_ALTER, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR_SET, NO_ERROR, NULL, sm_update_class(), smt_drop_query_spec(), smt_edit_class_mop(), and smt_quit().
DB_NAMELIST* db_get_object_id | ( | MOP | vclass | ) |
DB_QUERY_SPEC* db_get_query_specs | ( | DB_OBJECT * | obj | ) |
Definition at line 608 of file db_virt.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_CONNECT_NULL, NO_ERROR, NULL, and sm_class::query_spec.
Referenced by db_validate(), emit_query_specs(), emit_query_specs_has_using_index(), mq_translate_subqueries(), pt_check_cyclic_reference_in_view_spec(), and pt_vclass_compatible().
char* db_get_vclass_ldb_name | ( | DB_OBJECT * | op | ) |
Definition at line 281 of file db_virt.c.
References CHECK_2ARGS_ZERO, CHECK_CONNECT_ZERO, DB_FETCH_READ, db_is_updatable_object(), db_real_instance(), is_class(), locator_is_class(), and vid_compare_non_updatable_objects().
int db_is_real_instance | ( | DB_OBJECT * | obj | ) |
Definition at line 213 of file db_virt.c.
References CHECK_1ARG_ZERO, CHECK_CONNECT_ZERO, DB_FETCH_READ, db_object::is_vid, locator_is_class(), and vid_is_base_instance().
Referenced by db_real_instance().
Definition at line 395 of file db_virt.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_ZERO, CHECK_CONNECT_ZERO, sm_class::class_type, DB_FETCH_WRITE, db_get_attribute_type(), db_get_class(), db_real_instance(), DB_TYPE_NULL, ER_OBJ_INVALID_ARGUMENTS, ER_WS_NO_CLASS_FOR_INSTANCE, error(), ERROR_SET, locator_is_class(), mq_is_updatable_attribute(), NO_ERROR, NULL, SM_CLASS_CT, and SM_VCLASS_CT.
Referenced by obj_set_att().
int db_is_updatable_object | ( | DB_OBJECT * | obj | ) |
Definition at line 342 of file db_virt.c.
References au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_ZERO, CHECK_CONNECT_ZERO, sm_class::class_type, DB_FETCH_READ, ER_WS_NO_CLASS_FOR_INSTANCE, error(), ERROR_SET, db_object::is_vid, locator_is_class(), mq_is_updatable(), NO_ERROR, SM_CLASS_CT, SM_VCLASS_CT, and vid_is_updatable().
Referenced by db_instance_equal(), mr_cmpval_object(), and vid_encode_object().
int db_is_vclass | ( | DB_OBJECT * | op | ) |
Definition at line 681 of file db_virt.c.
References au_fetch_class_force(), AU_FETCH_READ, CHECK_CONNECT_ZERO, DB_FETCH_READ, error(), locator_is_class(), NULL, sm_get_class_type(), and SM_VCLASS_CT.
Referenced by catcls_vclass_install(), chksum_start(), class_type(), db_gadget_create(), db_validate_query_spec(), do_execute_delete(), do_execute_merge(), do_execute_update(), do_insert_template(), do_merge(), do_prepare_merge(), emit_indexes(), emit_query_specs(), emit_query_specs_has_using_index(), emit_schema(), insert_object_attr(), insert_subquery_results(), mq_fix_derived(), mq_push_paths_select(), mq_set_types(), mq_set_virt_object(), mq_translatable_class(), mq_translate_paths(), mq_translate_value(), pt_check_alter(), pt_check_attribute_domain(), pt_check_create_entity(), pt_check_cyclic_reference_in_view_spec(), pt_check_drop(), pt_flush_class_and_null_xasl(), pt_get_class_type(), pt_get_object_data_type(), pt_resolve_vclass_args(), pt_semantic_check_local(), pt_validate_query_spec(), regu_make_constant_vid(), smt_add_super(), tp_value_cast_internal(), tr_create_trigger(), update_object_attribute(), update_object_tuple(), and ws_vmop().
int db_namelist_add | ( | DB_NAMELIST ** | list, |
const char * | name | ||
) |
Definition at line 84 of file db_virt.c.
References CHECK_2ARGS_ZERO, CHECK_CONNECT_FALSE, error(), nlist_add(), and NULL.
int db_namelist_append | ( | DB_NAMELIST ** | list, |
const char * | name | ||
) |
Definition at line 108 of file db_virt.c.
References CHECK_2ARGS_ZERO, CHECK_CONNECT_FALSE, error(), nlist_append(), and NULL.
Referenced by do_set_object_id().
void db_namelist_free | ( | DB_NAMELIST * | list | ) |
Definition at line 71 of file db_virt.c.
References nlist_free().
Referenced by do_set_object_id().
DB_QUERY_SPEC* db_query_spec_next | ( | DB_QUERY_SPEC * | query_spec | ) |
Definition at line 632 of file db_virt.c.
References sm_query_spec::next, and NULL.
Referenced by db_validate(), emit_query_specs(), emit_query_specs_has_using_index(), mq_translate_subqueries(), pt_check_cyclic_reference_in_view_spec(), and pt_vclass_compatible().
const char* db_query_spec_string | ( | DB_QUERY_SPEC * | query_spec | ) |
Definition at line 651 of file db_virt.c.
References NULL, and sm_query_spec::specification.
Referenced by db_validate(), emit_query_specs(), emit_query_specs_has_using_index(), mq_translate_subqueries(), pt_check_cyclic_reference_in_view_spec(), and pt_vclass_compatible().
Definition at line 247 of file db_virt.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, db_is_real_instance(), db_object::is_vid, and vid_base_instance().
Referenced by db_fetch_composition(), db_instance_equal(), db_is_updatable_attribute(), do_replace_names_for_insert_values_pre(), insert_object_attr(), locator_fetch_set(), locator_lock_and_doesexist(), locator_lock_set(), mq_replace_virtual_oid_with_real_oid(), mq_translate_value(), mr_cmpval_object(), regu_make_constant_vid(), tp_value_cast_internal(), update_object_tuple(), vid_encode_object(), vid_object_to_vobj(), ws_identifier_with_check(), and ws_vmop().