CUBRID Engine
latest
|
#include "config.h"
#include "authenticate.h"
#include "boot_cl.h"
#include "class_object.h"
#include "db.h"
#include "dbtype.h"
#include "locator_cl.h"
#include "mem_block.hpp"
#include "network_interface_cl.h"
#include "object_accessor.h"
#include "object_primitive.h"
#include "object_print.h"
#include "object_printer.hpp"
#include "parser.h"
#include "schema_manager.h"
#include "schema_template.h"
#include "server_interface.h"
#include "set_object.h"
#include "storage_common.h"
#include "string_buffer.hpp"
#include "system_parameter.h"
#include "virtual_object.h"
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
DB_OBJECT* db_attribute_class | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1189 of file db_info.c.
References sm_attribute::class_mop, and NULL.
Referenced by class_attr_info(), emit_class_attributes(), emit_class_meta(), emit_foreign_key(), emit_instance_attributes(), emit_reverse_unique_def(), emit_unique_def(), ldr_compare_storage_order(), pt_check_alter(), and pt_check_mutable_attributes().
const char* db_attribute_comment | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1083 of file db_info.c.
References sm_attribute::comment, and NULL.
Referenced by class_attr_info().
DB_VALUE* db_attribute_default | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1209 of file db_info.c.
References sm_attribute::default_value, NULL, and sm_default_value::value.
Referenced by check_missing_non_null_attrs(), class_attr_info(), emit_attribute_def(), get_column_default_as_string(), pt_check_union_type_compatibility_of_values_query(), and pt_eval_path_expr().
DB_DOMAIN* db_attribute_domain | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1165 of file db_info.c.
References sm_attribute::domain, NULL, and sm_filter_domain().
Referenced by class_attr_info(), db_attdesc_domain(), do_alter_one_clause_with_template(), emit_attribute_def(), fn_collection(), get_attr_type(), has_dependencies(), oid_attr_info_set(), pt_check_alter(), pt_check_drop(), pt_get_attr_data_type(), pt_get_attributes(), pt_to_merge_update_xasl(), pt_to_odku_info(), pt_to_update_xasl(), rm_api_get_info(), sm_get_descriptor_component(), ux_get_attr_type_str(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), and vt_api_init_domain().
int db_attribute_id | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1124 of file db_info.c.
References sm_attribute::id, and NULL.
int db_attribute_is_auto_increment | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1309 of file db_info.c.
References sm_attribute::flags, NULL, and SM_ATTFLAG_AUTO_INCREMENT.
Referenced by pt_check_defaultf(), rm_api_get_info(), set_column_info(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
int db_attribute_is_foreign_key | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1282 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_CONSTRAINT_FOREIGN_KEY, and sm_constraint::type.
Referenced by set_column_info(), and sm_att_fk_constrained().
int db_attribute_is_indexed | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1375 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_IS_CONSTRAINT_INDEX_FAMILY, and sm_constraint::type.
Referenced by class_attr_info(), and emit_instance_attributes().
int db_attribute_is_non_null | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1355 of file db_info.c.
References sm_attribute::flags, NULL, and SM_ATTFLAG_NON_NULL.
Referenced by check_missing_non_null_attrs(), class_attr_info(), db_query_format_is_non_null(), do_check_fk_constraints_internal(), emit_attribute_def(), pt_check_defaultf(), pt_check_filter_index_expr(), and rm_api_get_info().
int db_attribute_is_primary_key | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1255 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_CONSTRAINT_PRIMARY_KEY, and sm_constraint::type.
Referenced by class_attr_info(), is_attribute_primary_key(), pt_check_defaultf(), and set_column_info().
int db_attribute_is_reverse_indexed | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1402 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, and sm_constraint::type.
Referenced by set_column_info().
int db_attribute_is_reverse_unique | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1328 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_CONSTRAINT_REVERSE_UNIQUE, and sm_constraint::type.
Referenced by class_attr_info(), emit_instance_attributes(), and set_column_info().
int db_attribute_is_shared | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1429 of file db_info.c.
References sm_attribute::header, ID_SHARED_ATTRIBUTE, sm_component::name_space, and NULL.
Referenced by class_attr_info(), do_check_fk_constraints_internal(), emit_class_meta(), emit_instance_attributes(), generate_natural_join_attrs_from_db_attrs(), get_reasonable_predicate(), ldr_compare_attribute_with_meta(), pt_get_attr_data_type(), pt_get_attributes(), and set_column_info().
int db_attribute_is_unique | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1228 of file db_info.c.
References sm_attribute::constraints, sm_constraint::next, NULL, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_UNIQUE, and sm_constraint::type.
Referenced by class_attr_info(), emit_instance_attributes(), and set_column_info().
int db_attribute_length | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1102 of file db_info.c.
References sm_attribute::domain, and tp_domain::precision.
const char* db_attribute_name | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1065 of file db_info.c.
References sm_attribute::header, sm_component::name, and NULL.
Referenced by check_missing_non_null_attrs(), chksum_print_attribute_list(), chksum_print_lower_bound_string(), chksum_print_pk_list(), class_attr_info(), db_gadget_create(), emit_attribute_def(), emit_class_meta(), emit_foreign_key(), emit_index_def(), emit_instance_attributes(), emit_reverse_unique_def(), emit_unique_def(), extract_objects(), fetch_constraint(), generate_natural_join_attrs_from_db_attrs(), get_attr_name(), get_reasonable_predicate(), ldr_compare_attribute_with_meta(), pt_check_union_type_compatibility_of_values_query(), pt_get_all_attributes_and_types(), pt_get_all_showstmt_attributes_and_types(), pt_get_attributes(), rm_api_get_info(), sch_attr_priv(), sch_exported_keys_or_cross_reference(), sch_imported_keys(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), vid_encode_object(), and vt_api_get_index_by_name().
DB_ATTRIBUTE* db_attribute_next | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1020 of file db_info.c.
References sm_attribute::header, ID_CLASS_ATTRIBUTE, sm_component::name_space, sm_component::next, NULL, and sm_attribute::order_link.
Referenced by check_missing_non_null_attrs(), chksum_print_attribute_list(), db_gadget_create(), db_validate(), delete_object_tuple(), do_alter_change_auto_increment(), do_alter_one_clause_with_template(), emit_class_attributes(), emit_class_meta(), emit_instance_attributes(), generate_natural_join_attrs_from_db_attrs(), get_attr_name(), has_dependencies(), ldr_compare_storage_order(), or_create(), pt_check_drop(), pt_check_union_type_compatibility_of_values_query(), pt_get_all_attributes_and_types(), pt_get_all_showstmt_attributes_and_types(), pt_get_attributes(), pt_resolve_vclass_args(), pt_to_delete_xasl(), sch_attr_priv(), sm_get_descriptor_component(), sm_truncate_class(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), and vid_encode_object().
int db_attribute_order | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1144 of file db_info.c.
References NULL, and sm_attribute::order.
Referenced by class_attr_info(), emit_class_meta(), and ldr_compare_attribute_with_meta().
DB_ATTRIBUTE* db_attribute_ordered_next | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1047 of file db_info.c.
References NULL, and sm_attribute::order_link.
DB_TYPE db_attribute_type | ( | DB_ATTRIBUTE * | attribute | ) |
Definition at line 1000 of file db_info.c.
References DB_TYPE_NULL, pr_type::id, NULL, and sm_attribute::type.
Referenced by emit_class_meta(), generate_natural_join_attrs_from_db_attrs(), get_reasonable_predicate(), ldr_compare_attribute_with_meta(), pt_check_drop(), pt_get_attributes(), and sm_get_descriptor_component().
int db_class_has_instance | ( | DB_OBJECT * | classobj | ) |
Definition at line 686 of file db_info.c.
References db_class_has_instance(), db_get_subclasses(), heap_has_instance(), db_objlist::next, db_objlist::op, sm_get_ch_heap(), and WS_OID.
Referenced by db_class_has_instance(), do_update_new_cols_with_default_expression(), and do_update_new_notnull_cols_without_default().
const int* db_constraint_asc_desc | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 2070 of file db_info.c.
References sm_class_constraint::asc_desc, and NULL.
Referenced by chksum_print_lower_bound_string(), chksum_print_pk_list(), do_create_midxkey_for_constraint(), and emit_index_def().
DB_ATTRIBUTE** db_constraint_attributes | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 2052 of file db_info.c.
References sm_class_constraint::attributes, and NULL.
Referenced by chksum_print_lower_bound_string(), chksum_print_pk_list(), emit_foreign_key(), emit_index_def(), emit_reverse_unique_def(), emit_unique_def(), fetch_constraint(), sch_constraint(), sch_exported_keys_or_cross_reference(), and sch_imported_keys().
DB_CONSTRAINT* db_constraint_find_primary_key | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 1956 of file db_info.c.
References db_constraint_next(), NULL, SM_CONSTRAINT_PRIMARY_KEY, and sm_class_constraint::type.
Referenced by chksum_start(), sch_exported_keys_or_cross_reference(), and sch_imported_keys().
BTID* db_constraint_index | ( | DB_CONSTRAINT * | constraint, |
BTID * | index | ||
) |
Definition at line 2107 of file db_info.c.
References BTID_COPY, sm_class_constraint::index_btid, and NULL.
Referenced by util_get_class_oids_and_index_btid().
const char* db_constraint_name | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 2031 of file db_info.c.
References sm_class_constraint::name, and NULL.
Referenced by fetch_constraint(), sch_exported_keys_or_cross_reference(), and sch_imported_keys().
DB_CONSTRAINT* db_constraint_next | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 1938 of file db_info.c.
References sm_class_constraint::next, and NULL.
Referenced by db_constraint_find_primary_key(), emit_foreign_key(), emit_index_def(), emit_reverse_unique_def(), emit_unique_def(), fetch_constraint(), sch_constraint(), sch_exported_keys_or_cross_reference(), and sch_imported_keys().
const int* db_constraint_prefix_length | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 2089 of file db_info.c.
References sm_class_constraint::attrs_prefix_length, and NULL.
Referenced by emit_index_def().
DB_CONSTRAINT_TYPE db_constraint_type | ( | const DB_CONSTRAINT * | constraint | ) |
Definition at line 1978 of file db_info.c.
References DB_CONSTRAINT_FOREIGN_KEY, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_NOT_NULL, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_CONSTRAINT_REVERSE_UNIQUE, DB_CONSTRAINT_UNIQUE, NULL, prm_get_bool_value(), PRM_ID_COMPAT_PRIMARY_KEY, SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_INDEX, SM_CONSTRAINT_NOT_NULL, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_CONSTRAINT_UNIQUE, and sm_class_constraint::type.
Referenced by classobj_copy_constraint_like(), db_get_btree_statistics(), do_alter_index_rebuild(), do_alter_one_clause_with_template(), do_copy_indexes(), do_create_partition_constraint(), emit_foreign_key(), emit_index_def(), emit_reverse_unique_def(), emit_unique_def(), fetch_constraint(), sch_constraint(), sch_exported_keys_or_cross_reference(), sch_imported_keys(), sm_drop_constraint(), sm_exist_index(), sm_save_constraint_info(), and smt_rename_any().
DB_OBJLIST* db_fetch_all_classes | ( | DB_FETCH_MODE | purpose | ) |
Definition at line 203 of file db_info.c.
References CHECK_CONNECT_NULL, and sm_fetch_all_classes().
Referenced by chksum_start(), db_find_class_of_index(), and help_class_names().
DB_OBJLIST* db_fetch_all_objects | ( | DB_OBJECT * | op, |
DB_FETCH_MODE | purpose | ||
) |
Definition at line 178 of file db_info.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, DB_FETCH_QUERY_READ, DB_FETCH_QUERY_WRITE, DB_FETCH_READ, DB_FETCH_WRITE, and sm_fetch_all_objects().
DB_OBJLIST* db_fetch_base_classes | ( | DB_FETCH_MODE | purpose | ) |
Definition at line 223 of file db_info.c.
References CHECK_CONNECT_NULL, and sm_fetch_all_base_classes().
Definition at line 133 of file db_info.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, and sm_find_class().
Referenced by au_add_method_check_authorization(), au_find_user(), au_find_user_to_drop(), chksum_init_checksum_tables(), chksum_report(), clist_init(), convert_speclist_to_objlist(), db_gadget_create(), db_get_attribute_by_name(), do_add_resolutions(), do_add_supers(), do_alter_change_auto_increment(), do_alter_change_col_comment(), do_alter_change_default_cs_coll(), do_alter_change_tbl_comment(), do_alter_clause_change_attribute(), do_alter_clause_drop_index(), do_alter_index_comment(), do_alter_index_rebuild(), do_alter_index_status(), do_alter_one_clause_with_template(), do_create_entity(), do_create_index(), do_create_trigger(), do_drop_index(), do_get_stats(), do_grant(), do_is_partitioned_subclass(), do_recreate_renamed_class_indexes(), do_rename_internal(), do_revoke(), do_update_stats(), drop_class_name(), emit_stored_procedure(), fetch_attribute(), help_print_info(), jsp_add_stored_procedure(), jsp_add_stored_procedure_argument(), jsp_find_stored_procedure(), la_apply_delete_log(), la_apply_insert_log(), la_apply_update_log(), la_get_ha_apply_info(), ldr_act_set_ref_class(), ldr_compare_storage_order(), ldr_find_class(), load_has_authorization(), optimizedb(), pt_attr_refers_to_self(), pt_check_attribute_domain(), pt_check_create_index(), pt_check_cume_dist_percent_rank_order_by(), pt_check_drop(), pt_check_truncate(), pt_check_union_type_compatibility_of_values_query(), pt_check_with_info(), pt_data_type_to_db_domain(), pt_find_users_class(), pt_fold_const_expr(), pt_node_data_type_to_db_domain(), pt_resolve_default_external(), pt_resolve_using_index(), pt_semantic_check_local(), pt_set_domain_class(), pt_type_assignable(), pt_vclass_compatible(), sch_attr_priv(), sch_class_priv(), sch_constraint(), sch_exported_keys_or_cross_reference(), sch_imported_keys(), sch_methfile_info(), sch_method_info(), sch_primary_key(), sch_superclass(), set_column_info(), sm_update_catalog_statistics(), synccoll_force(), trigger_to_object(), truncate_class_name(), truncate_need_repl_log(), update_locksets_for_multiple_rename(), ux_get_attr_type_str(), and ux_get_class_num_objs().
DB_OBJECT* db_find_class_of_index | ( | const char *const | index_name, |
const DB_CONSTRAINT_TYPE | index_type | ||
) |
Definition at line 74 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, classobj_find_class_constraint(), sm_class::constraints, db_fetch_all_classes(), DB_FETCH_READ, DB_IS_CONSTRAINT_INDEX_FAMILY, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_SM_INDEX_AMBIGUOUS, ER_SM_NO_INDEX, ER_WARNING_SEVERITY, db_objlist::next, NO_ERROR, NULL, db_objlist::op, and SM_MAP_DB_INDEX_CONSTRAINT_TO_SM_CONSTRAINT.
Referenced by pt_find_class_of_index().
Definition at line 153 of file db_info.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, and sm_find_class_with_purpose().
Referenced by pt_check_drop(), pt_find_class(), pt_make_flat_name_list(), and pt_resolve_partition_spec().
DB_OBJLIST* db_get_all_classes | ( | void | ) |
Definition at line 267 of file db_info.c.
References CHECK_CONNECT_NULL, DB_FETCH_QUERY_READ, and sm_fetch_all_classes().
Referenced by sch_class_priv().
DB_OBJLIST* db_get_all_objects | ( | DB_OBJECT * | op | ) |
Definition at line 246 of file db_info.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, DB_FETCH_QUERY_READ, and sm_fetch_all_objects().
Referenced by au_start(), and emit_stored_procedure().
DB_ATTRIBUTE* db_get_attribute | ( | DB_OBJECT * | obj, |
const char * | name | ||
) |
Definition at line 791 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_NULL, CHECK_CONNECT_NULL, classobj_find_attribute(), ER_OBJ_INVALID_ATTRIBUTE, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by check_target(), chksum_init_checksum_tables(), db_attdesc_domain(), db_get_attribute_by_name(), db_query_format_is_non_null(), do_alter_one_clause_with_template(), fetch_attribute(), fn_collection(), get_attr_type(), insert_object_attr(), oid_attr_info_set(), pt_check_cume_dist_percent_rank_order_by(), pt_check_union_type_compatibility_of_values_query(), pt_resolve_default_external(), pt_resolve_star(), pt_to_merge_update_xasl(), pt_to_odku_info(), pt_to_update_xasl(), set_column_info(), and ux_get_attr_type_str().
DB_ATTRIBUTE* db_get_attribute_by_name | ( | const char * | class_name, |
const char * | attribute_name | ||
) |
Definition at line 823 of file db_info.c.
References db_find_class(), db_get_attribute(), and NULL.
Referenced by is_attribute_primary_key(), pt_check_defaultf(), and pt_resolve_default_value().
DB_ATTRIBUTE* db_get_attributes | ( | DB_OBJECT * | obj | ) |
Definition at line 908 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, and sm_class::ordered_attributes.
Referenced by check_missing_non_null_attrs(), chksum_start(), db_gadget_create(), db_validate(), delete_object_tuple(), do_alter_change_auto_increment(), do_alter_one_clause_with_template(), do_create_trigger(), emit_class_meta(), emit_instance_attributes(), get_attr_name(), get_natural_join_attrs_from_pt_spec(), has_dependencies(), ldr_compare_storage_order(), or_create(), pt_check_alter(), pt_check_create_entity(), pt_get_attributes(), pt_to_delete_xasl(), sch_attr_priv(), sm_rename_class(), sm_truncate_class(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), and vid_encode_object().
DB_OBJLIST* db_get_base_classes | ( | void | ) |
Definition at line 284 of file db_info.c.
References CHECK_CONNECT_NULL, DB_FETCH_QUERY_READ, and sm_fetch_all_base_classes().
int db_get_btree_statistics | ( | DB_CONSTRAINT * | cons, |
int * | num_leaf_pages, | ||
int * | num_total_pages, | ||
int * | num_keys, | ||
int * | height | ||
) |
Definition at line 2365 of file db_info.c.
References ARG_FILE_LINE, assert_release, BTID_IS_NULL, btree_get_statistics(), db_constraint_type(), DB_IS_CONSTRAINT_INDEX_FAMILY, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, btree_stats::height, sm_class_constraint::index_btid, btree_stats::keys, btree_stats::leafs, NO_ERROR, NULL, btree_stats::pages, btree_stats::pkeys, and btree_stats::pkeys_size.
Definition at line 589 of file db_info.c.
References CHECK_CONNECT_NULL, and sm_get_class().
Referenced by cache_validation(), db_dput(), db_is_updatable_attribute(), db_put(), delete_object_tuple(), mq_get_expression(), mq_translate_value(), mr_cmpval_object(), or_create(), pt_eval_path_expr(), pt_exec_trigger_stmt(), pt_get_object_data_type(), pt_is_reference_to_reusable_oid(), pt_resolve_object(), quick_validate(), regu_make_constant_vid(), rs_set_db_value(), tp_value_cast_internal(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), vid_encode_object(), and vid_object_to_vobj().
DB_ATTRIBUTE* db_get_class_attribute | ( | DB_OBJECT * | obj, |
const char * | name | ||
) |
Definition at line 878 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_NULL, CHECK_CONNECT_NULL, classobj_find_attribute(), ER_OBJ_INVALID_ATTRIBUTE, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by db_attdesc_domain(), do_alter_one_clause_with_template(), fetch_attribute(), pt_check_alter(), and pt_find_class_attribute().
DB_ATTRIBUTE* db_get_class_attributes | ( | DB_OBJECT * | obj | ) |
Definition at line 939 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, sm_class::class_attributes, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by emit_class_attributes(), and pt_get_all_attributes_and_types().
Definition at line 1484 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_NULL, CHECK_CONNECT_NULL, classobj_find_method(), ER_OBJ_INVALID_METHOD, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by do_alter_one_clause_with_template(), ldr_act_set_constructor(), pt_check_alter(), pt_check_method(), pt_eval_method_call_type(), and pt_resolve_method_type().
Definition at line 1542 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, sm_class::class_methods, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by emit_methods(), and sch_method_info().
Definition at line 608 of file db_info.c.
References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, and sm_get_ch_name().
Referenced by au_get_new_auth(), check_object_domain(), chksum_start(), class_attr_info(), db_gadget_bind(), db_query_format_class_name(), db_validate(), db_validate_query_spec(), dbmeth_class_name(), object_printer::describe_class(), do_alter_clause_change_attribute(), do_check_rows_for_null(), emit_class_attributes(), emit_class_meta(), emit_class_owner(), emit_domain_def(), emit_foreign_key(), emit_index_def(), emit_instance_attributes(), emit_methods(), emit_partition_info(), emit_query_specs(), emit_query_specs_has_using_index(), emit_resolution_def(), emit_resolutions(), emit_reverse_unique_def(), emit_schema(), emit_superclasses(), emit_unique_def(), fetch_trigger(), find_instance(), fn_oid(), get_domain_str(), get_name_from_class_oid(), help_class_names(), ldr_class_name(), ldr_process_object_ref(), mq_check_authorization_path_entities(), mq_check_non_updatable_vclass_oid(), mq_evaluate_check_option(), mq_fetch_expression_for_real_class_update(), mq_fetch_one_real_class_get_cache(), mq_fetch_subqueries(), mq_fetch_subqueries_for_update_local(), mq_get_expression(), mq_set_non_updatable_oid(), mq_set_types(), mq_substitute_path(), mq_translate_tree(), mq_translate_value(), mq_virtual_queries(), object_to_string(), orp_oid_get_classname(), otable_insert(), otable_reserve(), pt_add_type_to_set(), pt_check_alter(), pt_check_drop(), pt_check_mutable_attributes(), pt_compile_trigger_stmt(), pt_copy_data_type_entity(), pt_eval_path_expr(), pt_find_class_of_index(), pt_get_attributes(), pt_get_object_data_type(), pt_help_show_create_table(), pt_make_subclass_list(), pt_resolve_object(), pt_to_method_sig_list(), pt_validate_query_spec(), rm_api_get_info(), sch_class_priv(), sch_exported_keys_or_cross_reference(), sch_imported_keys(), sch_superclass(), show_statistics(), sm_get_descriptor_component(), sm_truncate_using_delete(), smt_add_super(), tp_check_value_size(), tr_create_trigger(), tr_dump_trigger(), ux_oid_get(), and vid_getall_mops().
int db_get_class_num_objs_and_pages | ( | DB_OBJECT * | classmop, |
int | approximation, | ||
int * | nobjs, | ||
int * | npages | ||
) |
Definition at line 2311 of file db_info.c.
References ER_FAILED, error(), heap_get_class_num_objects_pages(), HFID_IS_NULL, NO_ERROR, NULL, and sm_get_ch_heap().
Referenced by ux_get_class_num_objs().
int db_get_class_privilege | ( | DB_OBJECT * | mop, |
unsigned int * | auth | ||
) |
Definition at line 2346 of file db_info.c.
References au_get_class_privilege(), ER_FAILED, and NULL.
Referenced by sch_attr_priv(), and sch_class_priv().
DB_RESOLUTION* db_get_class_resolutions | ( | DB_OBJECT * | obj | ) |
Definition at line 1767 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, ID_CLASS, sm_resolution::name_space, sm_resolution::next, NO_ERROR, NULL, and sm_class::resolutions.
DB_CONSTRAINT* db_get_constraints | ( | DB_OBJECT * | obj | ) |
Definition at line 1909 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, sm_class::constraints, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by chksum_start(), emit_foreign_key(), emit_index_def(), emit_reverse_unique_def(), emit_unique_def(), has_unique_constraint(), sch_constraint(), sch_exported_keys_or_cross_reference(), and sch_imported_keys().
const char* db_get_foreign_key_action | ( | DB_CONSTRAINT * | constraint, |
DB_FK_ACTION_TYPE | type | ||
) |
Definition at line 2143 of file db_info.c.
References classobj_describe_foreign_key_action(), DB_FK_DELETE, DB_FK_UPDATE, sm_foreign_key_info::delete_action, sm_class_constraint::fk_info, NULL, SM_CONSTRAINT_FOREIGN_KEY, sm_class_constraint::type, and sm_foreign_key_info::update_action.
DB_OBJECT* db_get_foreign_key_ref_class | ( | DB_CONSTRAINT * | constraint | ) |
Definition at line 2124 of file db_info.c.
References sm_class_constraint::fk_info, NULL, sm_foreign_key_info::ref_class_oid, SM_CONSTRAINT_FOREIGN_KEY, sm_class_constraint::type, and ws_mop().
Referenced by sch_imported_keys().
Definition at line 2239 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, sm_class::loader_commands, NO_ERROR, and NULL.
Definition at line 1454 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_NULL, CHECK_CONNECT_NULL, classobj_find_method(), ER_OBJ_INVALID_METHOD, er_set(), ER_WARNING_SEVERITY, NO_ERROR, and NULL.
Referenced by do_alter_one_clause_with_template(), pt_check_alter(), pt_check_method(), pt_eval_method_call_type(), and pt_resolve_method_type().
DB_METHFILE* db_get_method_files | ( | DB_OBJECT * | obj | ) |
Definition at line 2173 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, sm_class::method_files, NO_ERROR, and NULL.
Referenced by emit_method_files(), and sch_methfile_info().
Definition at line 1513 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, sm_class::methods, NO_ERROR, and NULL.
Referenced by emit_methods(), and sch_method_info().
DB_ATTRIBUTE* db_get_ordered_attributes | ( | DB_OBJECT * | obj | ) |
Definition at line 971 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, and sm_class::ordered_attributes.
DB_RESOLUTION* db_get_resolutions | ( | DB_OBJECT * | obj | ) |
Definition at line 1735 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, ID_CLASS, sm_resolution::name_space, sm_resolution::next, NO_ERROR, NULL, and sm_class::resolutions.
Referenced by emit_resolutions().
Definition at line 2407 of file db_info.c.
References assert, db_get_string(), db_is_class(), DB_IS_NULL, db_make_string_copy(), DB_VALUE_DOMAIN_TYPE, object_printer::describe_class(), er_errid(), ER_OBJ_NOT_A_CLASS, ER_QSTR_INVALID_DATA_TYPE, error(), string_buffer::get_buffer(), NO_ERROR, NULL, PRIM_SET_NULL(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, QSTR_IS_ANY_CHAR, and sm_find_class().
Referenced by pt_evaluate_db_value_expr().
DB_ATTRIBUTE* db_get_shared_attribute | ( | DB_OBJECT * | obj, |
const char * | name | ||
) |
Definition at line 849 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_2ARGS_NULL, CHECK_CONNECT_NULL, classobj_find_attribute(), ER_OBJ_INVALID_ATTRIBUTE, er_set(), ER_WARNING_SEVERITY, sm_attribute::header, ID_SHARED_ATTRIBUTE, sm_component::name_space, NO_ERROR, and NULL.
Referenced by pt_eval_path_expr().
DB_OBJLIST* db_get_subclasses | ( | DB_OBJECT * | obj | ) |
Definition at line 659 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, and sm_class::users.
Referenced by db_class_has_instance(), do_alter_one_clause_with_template(), pt_check_alter(), pt_make_subclass_list(), and sch_superclass().
DB_OBJLIST* db_get_superclasses | ( | DB_OBJECT * | obj | ) |
Definition at line 630 of file db_info.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_READ, AU_SELECT, CHECK_1ARG_NULL, CHECK_CONNECT_NULL, ER_OBJ_NO_COMPONENTS, er_set(), ER_WARNING_SEVERITY, sm_class::inheritance, NO_ERROR, and NULL.
Referenced by do_alter_one_clause_with_template(), emit_superclasses(), has_dependencies(), pt_check_alter(), sch_superclass(), and sm_get_descriptor_component().
Definition at line 722 of file db_info.c.
References NULL, and pr_type_name().
Referenced by csql_db_value_as_string(), emit_stored_procedure(), emit_stored_procedure_args(), get_domain_str(), ldr_act_elem(), ldr_date_time_conversion_error(), ldr_double_elem(), ldr_float_elem(), ldr_int_db_bigint(), ldr_int_db_int(), ldr_int_db_short(), ldr_int_elem(), ldr_monetary_elem(), ldr_real_db_double(), ldr_real_db_float(), ldr_str_db_char(), ldr_str_db_varchar(), parse_error(), and select_set_domain().
int db_is_any_class | ( | MOP | obj | ) |
Definition at line 356 of file db_info.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, CHECK_CONNECT_ZERO, DB_FETCH_READ, locator_is_class(), NO_ERROR, and NULL.
Referenced by db_validate(), do_replace_names_for_insert_values_pre(), method_invoke_for_server(), method_receive_results_for_stand_alone(), pt_eval_path_expr(), and vid_encode_object().
int db_is_class | ( | MOP | obj | ) |
Definition at line 310 of file db_info.c.
References assert, au_fetch_class_force(), AU_FETCH_READ, CHECK_CONNECT_ZERO, DB_FETCH_READ, locator_is_class(), NO_ERROR, NULL, SM_CLASS_CT, and sm_get_class_type().
Referenced by build_att_type_change_map(), db_get_schema_def_dbval(), do_update_new_cols_with_default_expression(), grok_classes(), mq_fetch_attributes(), mq_fetch_subqueries(), mq_fetch_subqueries_for_update_local(), mq_push_paths_select(), mq_translate_insert(), mq_translate_paths(), mq_translate_subqueries(), pt_check_alter(), pt_check_create_entity(), pt_check_create_index(), pt_check_drop(), pt_check_truncate(), pt_get_class_type(), pt_help_show_create_table(), pt_is_reference_to_reusable_oid(), pt_set_class_chn(), smt_add_super(), and vid_encode_object().
int db_is_deleted | ( | DB_OBJECT * | obj | ) |
Definition at line 531 of file db_info.c.
References CHECK_1ARG_ERROR, ER_HEAP_UNKNOWN_OBJECT, error(), db_object::lock, obj_lock(), WS_IS_DELETED, and X_LOCK.
Referenced by delete_list_by_oids(), do_replace_into(), and update_object_tuple().
int db_is_instance | ( | MOP | obj | ) |
Definition at line 394 of file db_info.c.
References CHECK_CONNECT_ZERO, and obj_isinstance().
Referenced by fetch_result(), fn_oid(), method_invoke_for_server(), method_receive_results_for_stand_alone(), pt_check_method(), ux_check_object(), and ux_str_to_obj().
Definition at line 417 of file db_info.c.
References CHECK_CONNECT_ZERO, NULL, and obj_is_instance_of().
Definition at line 483 of file db_info.c.
References CHECK_1ARG_MINUSONE, CHECK_CONNECT_ZERO, and sm_is_partition().
Referenced by mq_fetch_select_for_real_class_update().
Definition at line 445 of file db_info.c.
References CHECK_2ARGS_ZERO, CHECK_CONNECT_ZERO, and sm_is_subclass().
Referenced by build_att_type_change_map(), class_referenced_by_domain(), db_is_superclass(), pt_attr_refers_to_self(), pt_check_alter(), pt_check_drop(), pt_objects_assignable(), pt_type_assignable(), and tp_value_cast_internal().
Definition at line 466 of file db_info.c.
References db_is_subclass().
Referenced by mq_fetch_select_for_real_class_update(), and pt_check_alter().
int db_is_system_class | ( | MOP | op | ) |
Definition at line 502 of file db_info.c.
References CHECK_1ARG_ZERO, CHECK_CONNECT_ZERO, and sm_is_system_class().
Referenced by chksum_start(), class_type(), filter_system_classes(), pt_bind_names(), and ws_release_user_instance().
const char* db_methfile_name | ( | DB_METHFILE * | methfile | ) |
Definition at line 2219 of file db_info.c.
References sm_method_file::name, and NULL.
Referenced by emit_methfile_def(), and fetch_methfile().
DB_METHFILE* db_methfile_next | ( | DB_METHFILE * | methfile | ) |
Definition at line 2201 of file db_info.c.
References sm_method_file::next, and NULL.
Referenced by emit_method_files(), fetch_methfile(), and sch_methfile_info().
int db_method_arg_count | ( | DB_METHOD * | method | ) |
Definition at line 1710 of file db_info.c.
References cubregex::count(), NULL, sm_method_signature::num_args, and sm_method::signatures.
Referenced by emit_method_def(), fetch_method(), and pt_check_method().
Definition at line 1671 of file db_info.c.
References sm_method_signature::args, sm_method_argument::domain, sm_method_argument::index, sm_method_argument::next, NULL, sm_method::signatures, sm_filter_domain(), and sm_method_signature::value.
Referenced by emit_method_def(), fetch_method(), and pt_resolve_method_type().
Definition at line 1626 of file db_info.c.
References sm_method::class_mop, and NULL.
Referenced by emit_methods().
Definition at line 1606 of file db_info.c.
References sm_method_signature::function_name, NULL, and sm_method::signatures.
Referenced by emit_method_def().
Definition at line 1587 of file db_info.c.
References sm_method::header, sm_component::name, and NULL.
Referenced by emit_method_def(), and fetch_method().
Definition at line 1569 of file db_info.c.
References sm_method::header, sm_component::next, and NULL.
Referenced by emit_methods(), fetch_method(), and sch_method_info().
Definition at line 1646 of file db_info.c.
References sm_method_argument::domain, NULL, sm_method::signatures, sm_filter_domain(), and sm_method_signature::value.
Referenced by emit_method_def(), and pt_eval_method_call_type().
DB_OBJLIST* db_objlist_next | ( | DB_OBJLIST * | link | ) |
Definition at line 2271 of file db_info.c.
References db_objlist::next, and NULL.
DB_OBJECT* db_objlist_object | ( | DB_OBJLIST * | link | ) |
Definition at line 2290 of file db_info.c.
References NULL, and db_objlist::op.
const char* db_resolution_alias | ( | DB_RESOLUTION * | resolution | ) |
Definition at line 1862 of file db_info.c.
References sm_resolution::alias, and NULL.
Referenced by emit_resolution_def().
DB_OBJECT* db_resolution_class | ( | DB_RESOLUTION * | resolution | ) |
Definition at line 1823 of file db_info.c.
References sm_resolution::class_mop, and NULL.
Referenced by emit_resolution_def().
int db_resolution_isclass | ( | DB_RESOLUTION * | resolution | ) |
Definition at line 1882 of file db_info.c.
References ID_CLASS, sm_resolution::name_space, and NULL.
Referenced by emit_resolutions().
const char* db_resolution_name | ( | DB_RESOLUTION * | resolution | ) |
Definition at line 1843 of file db_info.c.
References sm_resolution::name, and NULL.
Referenced by emit_resolution_def().
DB_RESOLUTION* db_resolution_next | ( | DB_RESOLUTION * | resolution | ) |
Definition at line 1799 of file db_info.c.
References sm_resolution::name_space, sm_resolution::next, and NULL.
Referenced by emit_resolutions().
Definition at line 742 of file db_info.c.
References db_Connect_status, DB_CONNECTION_STATUS_CONNECTED, DB_TYPE_SUB, DB_TYPE_UNKNOWN, DB_TYPE_VARIABLE, pr_type::id, NULL, pr_find_type(), pt_string_to_db_domain(), tp_domain_free(), and tp_domain::type.