CUBRID Engine
latest
|
Go to the source code of this file.
Functions | |
SM_TEMPLATE * | smt_def_class (const char *name) |
SM_TEMPLATE * | smt_edit_class_mop (MOP class_, DB_AUTH db_auth_type) |
SM_TEMPLATE * | smt_copy_class_mop (const char *name, MOP op, SM_CLASS **class_) |
SM_TEMPLATE * | smt_copy_class (const char *new_name, const char *existing_name, SM_CLASS **class_) |
int | smt_quit (SM_TEMPLATE *template_) |
SM_TEMPLATE * | smt_def_typed_class (const char *name, SM_CLASS_TYPE ct) |
SM_CLASS_TYPE | smt_get_class_type (SM_TEMPLATE *template_) |
int | smt_add_attribute_w_dflt (DB_CTMPL *def, const char *name, const char *domain_string, DB_DOMAIN *domain, DB_VALUE *default_value, const SM_NAME_SPACE name_space, DB_DEFAULT_EXPR *default_expr, DB_DEFAULT_EXPR_TYPE *on_update, const char *comment) |
int | smt_add_attribute_w_dflt_w_order (DB_CTMPL *def, const char *name, const char *domain_string, DB_DOMAIN *domain, DB_VALUE *default_value, const SM_NAME_SPACE name_space, const bool add_first, const char *add_after_attribute, DB_DEFAULT_EXPR *default_expr, DB_DEFAULT_EXPR_TYPE *on_update, const char *comment) |
int | smt_add_attribute_any (SM_TEMPLATE *template_, const char *name, const char *domain_string, DB_DOMAIN *domain, const SM_NAME_SPACE name_space, const bool add_first, const char *add_after_attribute, const char *comment) |
int | smt_add_attribute (SM_TEMPLATE *template_, const char *name, const char *domain_string, DB_DOMAIN *domain) |
int | smt_add_set_attribute_domain (SM_TEMPLATE *template_, const char *name, int class_attribute, const char *domain_string, DB_DOMAIN *domain) |
int | smt_delete_set_attribute_domain (SM_TEMPLATE *template_, const char *name, int class_attribute, const char *domain_string, DB_DOMAIN *domain) |
int | smt_reset_attribute_domain (SM_TEMPLATE *template_, const char *name, int class_attribute) |
int | smt_set_attribute_default (SM_TEMPLATE *template_, const char *name, int class_attribute, DB_VALUE *value, DB_DEFAULT_EXPR *default_expr) |
int | smt_set_attribute_on_update (SM_TEMPLATE *template_, const char *name, int class_attribute, DB_DEFAULT_EXPR_TYPE on_update) |
int | smt_add_constraint (SM_TEMPLATE *template_, DB_CONSTRAINT_TYPE constraint_type, const char *constraint_name, const char **att_names, const int *asc_desc, const int *attr_prefix_length, int class_attribute, SM_FOREIGN_KEY_INFO *fk_info, SM_PREDICATE_INFO *filter_index, SM_FUNCTION_INFO *function_index, const char *comment, SM_INDEX_STATUS index_status) |
int | smt_drop_constraint (SM_TEMPLATE *template_, const char **att_names, const char *constraint_name, int class_attribute, SM_ATTRIBUTE_FLAG constraint) |
int | smt_add_index (SM_TEMPLATE *template_, const char *name, int on_or_off) |
int | smt_find_attribute (SM_TEMPLATE *template_, const char *name, int class_attribute, SM_ATTRIBUTE **attp) |
int | smt_add_method_any (SM_TEMPLATE *template_, const char *name, const char *implementation, SM_NAME_SPACE name_space) |
int | smt_add_method (SM_TEMPLATE *template_, const char *name, const char *implementation) |
int | smt_add_class_method (SM_TEMPLATE *template_, const char *name, const char *implementation) |
int | smt_change_method_implementation (SM_TEMPLATE *template_, const char *name, int class_method, const char *implementation) |
int | smt_assign_argument_domain (SM_TEMPLATE *template_, const char *name, int class_method, const char *implementation, int index, const char *domain_string, DB_DOMAIN *domain) |
int | smt_add_set_argument_domain (SM_TEMPLATE *template_, const char *name, int class_method, const char *implementation, int index, const char *domain_string, DB_DOMAIN *domain) |
int | smt_rename_any (SM_TEMPLATE *template_, const char *name, const bool class_namespace, const char *new_name) |
int | smt_change_constraint_comment (SM_TEMPLATE *ctemplate, const char *index_name, const char *comment) |
int | smt_change_constraint_status (SM_TEMPLATE *ctemplate, const char *index_name, SM_INDEX_STATUS index_status) |
int | smt_delete_any (SM_TEMPLATE *template_, const char *name, SM_NAME_SPACE name_space) |
int | smt_add_super (SM_TEMPLATE *template_, MOP super_class) |
int | smt_delete_super (SM_TEMPLATE *template_, MOP super_class) |
int | smt_delete_super_connect (SM_TEMPLATE *template_, MOP super_class) |
int | smt_add_method_file (SM_TEMPLATE *template_, const char *filename) |
int | smt_drop_method_file (SM_TEMPLATE *template_, const char *filename) |
int | smt_reset_method_files (SM_TEMPLATE *template_) |
int | smt_rename_method_file (SM_TEMPLATE *template_, const char *old_name, const char *new_name) |
int | smt_set_loader_commands (SM_TEMPLATE *template_, const char *commands) |
int | smt_add_resolution (SM_TEMPLATE *template_, MOP super_class, const char *name, const char *alias) |
int | smt_add_class_resolution (SM_TEMPLATE *template_, MOP super_class, const char *name, const char *alias) |
int | smt_delete_resolution (SM_TEMPLATE *template_, MOP super_class, const char *name) |
int | smt_delete_class_resolution (SM_TEMPLATE *template_, MOP super_class, const char *name) |
int | smt_add_query_spec (SM_TEMPLATE *template_, const char *specification) |
int | smt_drop_query_spec (SM_TEMPLATE *template_, const int index) |
int | smt_reset_query_spec (SM_TEMPLATE *template_) |
int | smt_change_query_spec (SM_TEMPLATE *def, const char *query, const int index) |
int | smt_change_attribute_w_dflt_w_order (DB_CTMPL *def, const char *name, const char *new_name, const char *new_domain_string, DB_DOMAIN *new_domain, const SM_NAME_SPACE name_space, DB_VALUE *new_default_value, DB_DEFAULT_EXPR *new_def_expr, DB_DEFAULT_EXPR_TYPE new_on_update_expr, const bool change_first, const char *change_after_attribute, SM_ATTRIBUTE **found_att) |
int | smt_check_index_exist (SM_TEMPLATE *template_, char **out_shared_cons_name, DB_CONSTRAINT_TYPE constraint_type, const char *constraint_name, const char **att_names, const int *asc_desc, const SM_PREDICATE_INFO *filter_index, const SM_FUNCTION_INFO *function_index) |
int smt_add_attribute | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain | ||
) |
Definition at line 1181 of file schema_template.c.
References ID_ATTRIBUTE, NULL, and smt_add_attribute_any().
Referenced by au_install(), boot_define_attribute(), boot_define_charsets(), boot_define_class(), boot_define_class_authorization(), boot_define_collations(), boot_define_data_type(), boot_define_domain(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_index(), boot_define_index_key(), boot_define_meth_argument(), boot_define_meth_file(), boot_define_meth_sig(), boot_define_method(), boot_define_partition(), boot_define_query_spec(), boot_define_serial(), boot_define_stored_procedure(), and boot_define_stored_procedure_arguments().
int smt_add_attribute_any | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain, | ||
const SM_NAME_SPACE | name_space, | ||
const bool | add_first, | ||
const char * | add_after_attribute, | ||
const char * | comment | ||
) |
Definition at line 1002 of file schema_template.c.
References assert, sm_attribute::auto_increment, check_domain_class_type(), check_namespace(), tp_domain::class_mop, sm_attribute::class_mop, classobj_free_attribute(), classobj_make_attribute(), sm_attribute::comment, DB_TYPE_OBJECT, sm_attribute::domain, er_errid(), ER_SM_INVALID_ARGUMENTS, ERROR0, sm_attribute::flags, get_domain(), ID_ATTRIBUTE, ID_CLASS, ID_CLASS_ATTRIBUTE, ID_INSTANCE, ID_SHARED_ATTRIBUTE, NO_ERROR, NULL, SM_ATTFLAG_NEW, sm_check_name(), sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, smt_add_attribute_to_list(), TP_DOMAIN_TYPE, tp_domain::type, and ws_copy_string().
Referenced by db_add_attribute_internal(), smt_add_attribute(), and smt_add_attribute_w_dflt_w_order().
int smt_add_attribute_w_dflt | ( | DB_CTMPL * | def, |
const char * | name, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain, | ||
DB_VALUE * | default_value, | ||
const SM_NAME_SPACE | name_space, | ||
DB_DEFAULT_EXPR * | default_expr, | ||
DB_DEFAULT_EXPR_TYPE * | on_update, | ||
const char * | comment | ||
) |
Definition at line 974 of file schema_template.c.
References NULL, and smt_add_attribute_w_dflt_w_order().
Referenced by classobj_copy_attribute_like(), dbt_add_attribute(), dbt_add_class_attribute(), dbt_add_shared_attribute(), and do_add_attribute_from_select_column().
int smt_add_attribute_w_dflt_w_order | ( | DB_CTMPL * | def, |
const char * | name, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain, | ||
DB_VALUE * | default_value, | ||
const SM_NAME_SPACE | name_space, | ||
const bool | add_first, | ||
const char * | add_after_attribute, | ||
DB_DEFAULT_EXPR * | default_expr, | ||
DB_DEFAULT_EXPR_TYPE * | on_update, | ||
const char * | comment | ||
) |
Definition at line 927 of file schema_template.c.
References error(), ID_CLASS_ATTRIBUTE, NO_ERROR, NULL, smt_add_attribute_any(), smt_set_attribute_default(), and smt_set_attribute_on_update().
Referenced by do_add_attribute(), and smt_add_attribute_w_dflt().
int smt_add_class_method | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const char * | implementation | ||
) |
Definition at line 2373 of file schema_template.c.
References ID_CLASS_METHOD, and smt_add_method_any().
Referenced by au_add_method_check_authorization(), au_install(), and boot_define_serial().
int smt_add_class_resolution | ( | SM_TEMPLATE * | template_, |
MOP | super_class, | ||
const char * | name, | ||
const char * | alias | ||
) |
Definition at line 3912 of file schema_template.c.
References add_resolution(), and ID_CLASS.
Referenced by db_add_class_resolution(), and dbt_add_class_resolution().
int smt_add_constraint | ( | SM_TEMPLATE * | template_, |
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char * | constraint_name, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const int * | attr_prefix_length, | ||
int | class_attribute, | ||
SM_FOREIGN_KEY_INFO * | fk_info, | ||
SM_PREDICATE_INFO * | filter_index, | ||
SM_FUNCTION_INFO * | function_index, | ||
const char * | comment, | ||
SM_INDEX_STATUS | index_status | ||
) |
Definition at line 1936 of file schema_template.c.
References ARG_FILE_LINE, assert, sm_template::class_type, DB_CONSTRAINT_INDEX, DB_CONSTRAINT_PRIMARY_KEY, DB_CONSTRAINT_REVERSE_INDEX, DB_IS_NULL, DB_TYPE_BLOB, DB_TYPE_CLOB, default_value, do_check_rows_for_null(), er_clear(), ER_ERROR_SEVERITY, ER_FK_CANT_ON_SHARED_ATTRIBUTE, ER_OBJ_INVALID_ARGUMENTS, ER_OUT_OF_VIRTUAL_MEMORY, ER_REGU_NOT_IMPLEMENTED, er_set(), ER_SM_ATTR_NOT_NULL, ER_SM_CONSTRAINT_EXISTS, ER_SM_INDEX_ATTR_DUPLICATED, ER_SM_INDEX_ON_SHARED, ER_SM_INHERITED_ATTRIBUTE, ER_SM_INVALID_ARGUMENTS, ER_SM_INVALID_CONSTRAINT, ER_SM_INVALID_INDEX_TYPE, ER_SM_INVALID_INDEX_WITH_PREFIX_TYPE, ER_SM_INVALID_PREFIX_LENGTH, ER_SM_INVALID_UNIQUE_TYPE, ER_SM_NOT_NULL_NOT_ALLOWED, ER_SM_NOT_NULL_ON_VCLASS, ER_SM_NOT_NULL_WRONG_NUM_ATTS, ER_SM_UNIQUE_ON_VCLASS, error(), ERROR0, ERROR1, ERROR2, sm_attribute::flags, free_and_init, sm_attribute::header, i, pr_type::id, sm_attribute::id, ID_ATTRIBUTE, ID_SHARED_ATTRIBUTE, intl_identifier_casecmp(), sm_component::name, sm_component::name_space, NO_ERROR, NULL, sm_template::op, pr_type_name(), rel_major_release_string(), SM_ATTFLAG_FOREIGN_KEY, SM_ATTFLAG_INDEX, SM_ATTFLAG_NON_NULL, SM_ATTFLAG_PRIMARY_KEY, SM_ATTFLAG_REVERSE_INDEX, SM_CLASS_CT, SM_GET_CONSTRAINT_STRING, SM_IS_ATTFLAG_INDEX_FAMILY, SM_IS_ATTFLAG_UNIQUE_FAMILY, SM_MAP_CONSTRAINT_TO_ATTFLAG, SM_MAP_INDEX_ATTFLAG_TO_CONSTRAINT, smt_add_constraint_to_property(), smt_check_foreign_key(), smt_check_index_exist(), smt_find_attribute(), TEXT_CONSTRAINT_PREFIX, TP_IS_BIT_TYPE, TP_IS_CHAR_TYPE, tp_valid_indextype(), and sm_attribute::type.
Referenced by classobj_copy_constraint_like(), dbt_add_constraint(), dbt_add_foreign_key(), do_add_constraints(), and sm_add_constraint().
int smt_add_index | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | on_or_off | ||
) |
int smt_add_method | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const char * | implementation | ||
) |
Definition at line 2367 of file schema_template.c.
References ID_METHOD, and smt_add_method_any().
Referenced by au_install().
int smt_add_method_any | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const char * | implementation, | ||
SM_NAME_SPACE | name_space | ||
) |
Definition at line 2255 of file schema_template.c.
References ASSERT_ERROR_AND_SET, check_namespace(), sm_method::class_mop, classobj_make_method(), classobj_make_method_signature(), ER_SM_SIGNATURE_EXISTS, error(), ERROR2, ID_CLASS, ID_CLASS_METHOD, sm_template::name, NLIST_FIND, NO_ERROR, NULL, sm_template::op, sm_method::signatures, sm_check_name(), sm_downcase_name(), SM_FIND_NAME_IN_COMPONENT_LIST, sm_get_ch_name(), SM_MAX_IDENTIFIER_LENGTH, and WS_LIST_APPEND.
Referenced by add_method_internal(), dbt_add_class_method(), dbt_add_method(), smt_add_class_method(), and smt_add_method().
int smt_add_method_file | ( | SM_TEMPLATE * | template_, |
const char * | filename | ||
) |
Definition at line 3457 of file schema_template.c.
References assert, sm_method_file::class_mop, classobj_make_method_file(), er_errid(), error(), sm_template::method_files, NLIST_FIND, NO_ERROR, NULL, and WS_LIST_APPEND.
Referenced by db_add_method_file(), and dbt_add_method_file().
int smt_add_query_spec | ( | SM_TEMPLATE * | template_, |
const char * | specification | ||
) |
Definition at line 3950 of file schema_template.c.
References ARG_FILE_LINE, assert, classobj_make_query_spec(), db_ws_free(), er_errid(), er_set(), ER_SM_INVALID_CLASS, ER_WARNING_SEVERITY, error(), NO_ERROR, NULL, sm_template::query_spec, SM_VCLASS_CT, and WS_LIST_APPEND.
Referenced by db_add_query_spec(), and dbt_add_query_spec().
int smt_add_resolution | ( | SM_TEMPLATE * | template_, |
MOP | super_class, | ||
const char * | name, | ||
const char * | alias | ||
) |
Definition at line 3906 of file schema_template.c.
References add_resolution(), and ID_INSTANCE.
Referenced by db_add_resolution(), and dbt_add_resolution().
int smt_add_set_argument_domain | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_method, | ||
const char * | implementation, | ||
int | index, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain | ||
) |
Definition at line 2509 of file schema_template.c.
References sm_method_argument::domain, ER_SM_ARG_DOMAIN_NOT_A_SET, ER_SM_DOMAIN_NOT_FOUND, error(), ERROR2, find_argument(), get_domain(), NO_ERROR, NULL, pr_is_set_type(), tp_domain::setdomain, tp_domain_add(), and TP_DOMAIN_TYPE.
Referenced by add_arg_domain(), dbt_add_set_argument_domain(), and do_add_methods().
int smt_add_set_attribute_domain | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain | ||
) |
Definition at line 1198 of file schema_template.c.
References assert, sm_attribute::domain, er_errid(), ER_SM_DOMAIN_NOT_A_SET, ER_SM_NO_NESTED_SETS, error(), ERROR1, get_domain(), tp_domain::is_cached, NO_ERROR, NULL, pr_is_set_type(), tp_domain::setdomain, smt_find_attribute(), tp_domain_add(), tp_domain_cache(), tp_domain_copy(), tp_domain_free(), and TP_DOMAIN_TYPE.
Referenced by db_add_set_attribute_domain(), and dbt_add_set_attribute_domain().
int smt_add_super | ( | SM_TEMPLATE * | template_, |
MOP | super_class | ||
) |
Definition at line 3330 of file schema_template.c.
References sm_template::class_type, db_get_class_name(), db_is_class(), db_is_vclass(), ER_SM_INCOMPATIBLE_SUPER_CLASS, ER_SM_SUPER_CAUSES_CYCLES, ER_SM_SUPER_CLASS_EXISTS, error(), ERROR0, ERROR2, sm_template::inheritance, is_class(), ml_append(), ml_find(), sm_template::name, NO_ERROR, NULL, sm_template::op, SM_CLASS_CT, and SM_VCLASS_CT.
Referenced by db_add_super_internal(), and dbt_add_super().
int smt_assign_argument_domain | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_method, | ||
const char * | implementation, | ||
int | index, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain | ||
) |
Definition at line 2453 of file schema_template.c.
References sm_method_argument::domain, error(), find_argument(), get_domain(), NO_ERROR, NULL, tp_domain::type, and sm_method_argument::type.
Referenced by add_arg_domain(), au_add_method_check_authorization(), au_install(), dbt_add_argument(), and do_add_methods().
int smt_change_attribute_w_dflt_w_order | ( | DB_CTMPL * | def, |
const char * | name, | ||
const char * | new_name, | ||
const char * | new_domain_string, | ||
DB_DOMAIN * | new_domain, | ||
const SM_NAME_SPACE | name_space, | ||
DB_VALUE * | new_default_value, | ||
DB_DEFAULT_EXPR * | new_def_expr, | ||
DB_DEFAULT_EXPR_TYPE | new_on_update_expr, | ||
const bool | change_first, | ||
const char * | change_after_attribute, | ||
SM_ATTRIBUTE ** | found_att | ||
) |
Definition at line 4387 of file schema_template.c.
References assert, DB_DEFAULT_NONE, DB_IS_NULL, db_value_coerce(), db_default_expr::default_expr_type, db_value::domain, DOMAIN_COMPATIBLE, ER_OBJ_DOMAIN_CONFLICT, ER_UNEXPECTED, error(), ERROR1, ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, NO_ERROR, NULL, pr_free_ext_value(), pr_make_ext_value(), SM_ATTFLAG_NEW, smt_change_attribute(), smt_set_attribute_default(), smt_set_attribute_on_update(), smt_set_attribute_orig_default_value(), tp_domain_check(), and TP_EXACT_MATCH.
Referenced by do_change_att_schema_only().
int smt_change_constraint_comment | ( | SM_TEMPLATE * | ctemplate, |
const char * | index_name, | ||
const char * | comment | ||
) |
Definition at line 3044 of file schema_template.c.
References assert, ASSERT_ERROR_AND_SET, change_constraints_comment_partitioned_class(), classobj_change_constraint_comment(), error(), NO_ERROR, NULL, sm_template::op, sm_template::properties, and smt_find_constraint().
Referenced by do_alter_index_comment(), and do_alter_index_rebuild().
int smt_change_constraint_status | ( | SM_TEMPLATE * | ctemplate, |
const char * | index_name, | ||
SM_INDEX_STATUS | index_status | ||
) |
Definition at line 4786 of file schema_template.c.
References assert, ASSERT_ERROR_AND_SET, change_constraints_status_partitioned_class(), classobj_change_constraint_status(), error(), NO_ERROR, NULL, sm_template::op, sm_template::properties, smt_find_constraint(), and smt_is_change_status_allowed().
Referenced by do_alter_index_status(), and sm_add_constraint().
int smt_change_method_implementation | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_method, | ||
const char * | implementation | ||
) |
Definition at line 2393 of file schema_template.c.
References ASSERT_ERROR_AND_SET, ER_SM_METHOD_NOT_FOUND, ER_SM_MULTIPLE_SIGNATURES, ER_SM_SIGNATURE_NOT_FOUND, error(), ERROR1, ERROR2, sm_method_signature::function, sm_method::function, sm_method_signature::function_name, sm_method_signature::next, NO_ERROR, NULL, sm_method::signatures, SM_FIND_NAME_IN_COMPONENT_LIST, ws_copy_string(), and ws_free_string().
Referenced by db_change_method_implementation(), and dbt_change_method_implementation().
int smt_change_query_spec | ( | SM_TEMPLATE * | def, |
const char * | query, | ||
const int | index | ||
) |
Definition at line 4097 of file schema_template.c.
References sm_resolution::alias, ARG_FILE_LINE, assert, sm_class::attributes, sm_class::class_attributes, sm_class::class_methods, classobj_free_query_spec(), classobj_make_query_spec(), DB_FETCH_QUERY_WRITE, DB_FETCH_WRITE, DOWNCASE_NAME, er_errid(), er_set(), ER_SM_QUERY_SPEC_NOT_FOUND, ER_WARNING_SEVERITY, error(), parser_context::file, sm_attribute::header, sm_method::header, i, locator_fetch_class(), locator_free_list_mops(), locator_get_all_mops(), sm_class::methods, list_mops::mops, sm_component::name, sm_resolution::name, sm_resolution::next, sm_query_spec::next, NO_ERROR, NULL, list_mops::num, sm_template::query_spec, sm_class::resolutions, sm_class::shared, SM_MAX_IDENTIFIER_LENGTH, sm_Root_class_mop, and ws_dirty().
Referenced by db_change_query_spec(), and dbt_change_query_spec().
int smt_check_index_exist | ( | SM_TEMPLATE * | template_, |
char ** | out_shared_cons_name, | ||
DB_CONSTRAINT_TYPE | constraint_type, | ||
const char * | constraint_name, | ||
const char ** | att_names, | ||
const int * | asc_desc, | ||
const SM_PREDICATE_INFO * | filter_index, | ||
const SM_FUNCTION_INFO * | function_index | ||
) |
Definition at line 1872 of file schema_template.c.
References sm_template::attributes, au_fetch_class(), AU_FETCH_READ, AU_INDEX, classobj_check_index_exist(), classobj_free_class_constraints(), classobj_make_class_constraints(), sm_class::constraints, DB_IS_CONSTRAINT_INDEX_FAMILY, error(), sm_template::name, NO_ERROR, NULL, sm_template::op, and sm_template::properties.
Referenced by sm_add_constraint(), and smt_add_constraint().
SM_TEMPLATE* smt_copy_class | ( | const char * | new_name, |
const char * | existing_name, | ||
SM_CLASS ** | class_ | ||
) |
Definition at line 871 of file schema_template.c.
References NULL, sm_check_name(), sm_find_class(), and smt_copy_class_mop().
Referenced by dbt_copy_class().
SM_TEMPLATE* smt_copy_class_mop | ( | const char * | name, |
MOP | op, | ||
SM_CLASS ** | class_ | ||
) |
Definition at line 825 of file schema_template.c.
References ARG_FILE_LINE, assert, au_fetch_class(), AU_FETCH_READ, classobj_make_template_like(), DB_AUTH_SELECT, DB_FETCH_READ, ER_ERROR_SEVERITY, ER_OBJ_NOT_A_CLASS, er_set(), is_class(), locator_is_class(), NO_ERROR, NULL, and SM_CLASS_CT.
Referenced by smt_copy_class().
SM_TEMPLATE* smt_def_class | ( | const char * | name | ) |
Definition at line 733 of file schema_template.c.
References def_class_internal(), and SM_CLASS_CT.
Referenced by classobj_make_template_like(), db_create_class(), and dbt_create_class().
SM_TEMPLATE* smt_def_typed_class | ( | const char * | name, |
SM_CLASS_TYPE | ct | ||
) |
Definition at line 4058 of file schema_template.c.
References def_class_internal().
Referenced by db_create_vclass(), and dbt_create_vclass().
int smt_delete_any | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
SM_NAME_SPACE | name_space | ||
) |
Definition at line 3137 of file schema_template.c.
References sm_template::attributes, check_alias_delete(), sm_template::class_attributes, sm_template::class_methods, classobj_free_attribute(), classobj_free_method(), ER_SM_ATTRIBUTE_NOT_FOUND, ER_SM_ATTRIBUTE_PRIMARY_KEY_MEMBER, ER_SM_INVALID_ARGUMENTS, error(), ERROR0, ERROR1, find_any(), find_method(), sm_attribute::flags, sm_attribute::header, ID_ATTRIBUTE, ID_CLASS, ID_CLASS_ATTRIBUTE, ID_CLASS_METHOD, ID_INSTANCE, ID_METHOD, ID_SHARED_ATTRIBUTE, sm_template::methods, sm_component::name_space, NO_ERROR, SM_ATTFLAG_PRIMARY_KEY, smt_delete_any(), smt_find_attribute(), and WS_LIST_REMOVE.
Referenced by dbt_drop_attribute(), dbt_drop_class_attribute(), dbt_drop_class_method(), dbt_drop_method(), dbt_drop_shared_attribute(), drop_internal(), and smt_delete_any().
int smt_delete_class_resolution | ( | SM_TEMPLATE * | template_, |
MOP | super_class, | ||
const char * | name | ||
) |
Definition at line 3936 of file schema_template.c.
References delete_resolution(), and ID_CLASS.
Referenced by db_drop_class_resolution(), and dbt_drop_class_resolution().
int smt_delete_resolution | ( | SM_TEMPLATE * | template_, |
MOP | super_class, | ||
const char * | name | ||
) |
Definition at line 3930 of file schema_template.c.
References delete_resolution(), and ID_INSTANCE.
Referenced by db_drop_resolution(), and dbt_drop_resolution().
int smt_delete_set_attribute_domain | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute, | ||
const char * | domain_string, | ||
DB_DOMAIN * | domain | ||
) |
Definition at line 1273 of file schema_template.c.
References assert, sm_attribute::domain, ER_SM_DOMAIN_NOT_A_SET, ER_SM_DOMAIN_NOT_FOUND, error(), ERROR1, ERROR2, get_domain(), NO_ERROR, NULL, pr_is_set_type(), tp_domain::setdomain, smt_find_attribute(), tp_domain_drop(), and TP_DOMAIN_TYPE.
Referenced by db_drop_set_attribute_domain(), and dbt_drop_set_attribute_domain().
int smt_delete_super | ( | SM_TEMPLATE * | template_, |
MOP | super_class | ||
) |
Definition at line 3394 of file schema_template.c.
References ER_SM_SUPER_NOT_FOUND, error(), ERROR0, sm_template::inheritance, ml_remove(), and NO_ERROR.
Referenced by db_drop_super(), and dbt_drop_super().
int smt_delete_super_connect | ( | SM_TEMPLATE * | template_, |
MOP | super_class | ||
) |
Definition at line 3416 of file schema_template.c.
References au_fetch_class(), AU_FETCH_WRITE, AU_SELECT, ER_SM_SUPER_NOT_FOUND, error(), ERROR0, sm_class::inheritance, sm_template::inheritance, ml_append(), ml_remove(), db_objlist::next, NO_ERROR, NULL, and db_objlist::op.
Referenced by db_drop_super_connect(), and dbt_drop_super_connect().
int smt_drop_constraint | ( | SM_TEMPLATE * | template_, |
const char ** | att_names, | ||
const char * | constraint_name, | ||
int | class_attribute, | ||
SM_ATTRIBUTE_FLAG | constraint | ||
) |
Definition at line 1764 of file schema_template.c.
References assert, sm_template::attributes, classobj_find_cons_primary_key(), classobj_is_pk_referred(), sm_class::constraints, sm_template::current, er_errid(), ER_FK_CANT_DROP_PK_REFERRED, ER_SM_CONSTRAINT_NOT_FOUND, ER_SM_INHERITED, ER_SM_INVALID_ARGUMENTS, ER_SM_NOT_NULL_WRONG_NUM_ATTS, error(), ERROR0, ERROR1, ERROR2, sm_class_constraint::fk_info, sm_attribute::flags, sm_attribute::header, sm_class_constraint::name, sm_component::next, NO_ERROR, NULL, sm_template::op, sm_template::partition, SM_ATTFLAG_NON_NULL, SM_ATTFLAG_PRIMARY_KEY, sm_get_ch_name(), SM_IS_ATTFLAG_UNIQUE_FAMILY_OR_FOREIGN_KEY, smt_drop_constraint_from_property(), smt_find_attribute(), and smt_find_owner_of_constraint().
Referenced by dbt_drop_constraint(), and sm_drop_constraint().
int smt_drop_method_file | ( | SM_TEMPLATE * | template_, |
const char * | filename | ||
) |
Definition at line 3506 of file schema_template.c.
References ARG_FILE_LINE, classobj_free_method_file(), er_set(), ER_SM_METHOD_FILE_NOT_FOUND, ER_WARNING_SEVERITY, error(), parser_context::file, sm_template::method_files, sm_method_file::name, sm_method_file::next, NO_ERROR, and NULL.
Referenced by db_drop_method_file(), and dbt_drop_method_file().
int smt_drop_query_spec | ( | SM_TEMPLATE * | template_, |
const int | index | ||
) |
Definition at line 4006 of file schema_template.c.
References ARG_FILE_LINE, classobj_free_query_spec(), er_set(), ER_SM_QUERY_SPEC_NOT_FOUND, ER_WARNING_SEVERITY, error(), parser_context::file, i, sm_query_spec::next, NO_ERROR, NULL, and sm_template::query_spec.
Referenced by db_drop_query_spec(), and dbt_drop_query_spec().
SM_TEMPLATE* smt_edit_class_mop | ( | MOP | class_, |
DB_AUTH | db_auth_type | ||
) |
Definition at line 751 of file schema_template.c.
References ARG_FILE_LINE, au_fetch_class(), AU_FETCH_WRITE, classobj_make_template(), DB_FETCH_WRITE, ER_OBJ_NOT_A_CLASS, er_set(), ER_WARNING_SEVERITY, is_class(), locator_is_class(), NO_ERROR, NULL, sm_check_name(), sm_clean_class(), sm_find_class(), sm_get_ch_name(), and smt_edit_class_mop().
Referenced by add_arg_domain(), add_method_internal(), au_add_method_check_authorization(), au_install(), boot_define_attribute(), boot_define_charsets(), boot_define_class(), boot_define_class_authorization(), boot_define_collations(), boot_define_data_type(), boot_define_domain(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_index(), boot_define_index_key(), boot_define_meth_argument(), boot_define_meth_file(), boot_define_meth_sig(), boot_define_method(), boot_define_partition(), boot_define_query_spec(), boot_define_serial(), boot_define_stored_procedure(), boot_define_stored_procedure_arguments(), change_constraints_comment_partitioned_class(), change_constraints_status_partitioned_class(), db_add_attribute_internal(), db_add_class_resolution(), db_add_method_file(), db_add_query_spec(), db_add_resolution(), db_add_set_attribute_domain(), db_add_super_internal(), db_change_default(), db_change_method_implementation(), db_change_query_spec(), db_drop_class_resolution(), db_drop_method_file(), db_drop_method_files(), db_drop_query_spec(), db_drop_resolution(), db_drop_set_attribute_domain(), db_drop_super(), db_drop_super_connect(), db_rename_internal(), db_set_loader_commands(), dbt_edit_class(), do_alter_index_comment(), do_alter_index_rebuild(), do_alter_index_status(), drop_internal(), sm_add_constraint(), sm_drop_constraint(), smt_edit_class_mop(), smt_rename_any(), and update_fk_ref_partitioned_class().
int smt_find_attribute | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute, | ||
SM_ATTRIBUTE ** | attp | ||
) |
Definition at line 140 of file schema_template.c.
References ASSERT_ERROR_AND_SET, classobj_find_attribute(), sm_template::current, ER_SM_ATTRIBUTE_NOT_FOUND, ER_SM_INHERITED_ATTRIBUTE, error(), ERROR1, ERROR2, NO_ERROR, NULL, sm_check_name(), SM_FIND_NAME_IN_COMPONENT_LIST, and sm_get_ch_name().
Referenced by build_attr_change_map(), dbt_drop_attribute(), do_add_attribute(), do_alter_change_col_comment(), do_check_fk_constraints_internal(), smt_add_constraint(), smt_add_set_attribute_domain(), smt_change_attribute(), smt_check_foreign_key(), smt_delete_any(), smt_delete_set_attribute_domain(), smt_drop_constraint(), smt_rename_any(), smt_set_attribute_default(), and smt_set_attribute_on_update().
SM_CLASS_TYPE smt_get_class_type | ( | SM_TEMPLATE * | template_ | ) |
Definition at line 4070 of file schema_template.c.
Referenced by do_add_attribute(), and do_change_att_schema_only().
int smt_quit | ( | SM_TEMPLATE * | template_ | ) |
Definition at line 897 of file schema_template.c.
References classobj_free_template(), error(), NO_ERROR, and NULL.
Referenced by add_arg_domain(), add_method_internal(), change_constraints_comment_partitioned_class(), change_constraints_status_partitioned_class(), db_add_attribute_internal(), db_add_class_resolution(), db_add_method_file(), db_add_query_spec(), db_add_resolution(), db_add_set_attribute_domain(), db_add_super_internal(), db_change_default(), db_change_method_implementation(), db_change_query_spec(), db_create_class(), db_create_vclass(), db_drop_class_resolution(), db_drop_method_file(), db_drop_method_files(), db_drop_query_spec(), db_drop_resolution(), db_drop_set_attribute_domain(), db_drop_super(), db_drop_super_connect(), db_rename_internal(), db_set_loader_commands(), dbt_abort_class(), dbt_reserve_name(), do_alter_index_comment(), do_alter_index_rebuild(), do_alter_index_status(), drop_internal(), sm_add_constraint(), sm_drop_constraint(), smt_rename_any(), and update_fk_ref_partitioned_class().
int smt_rename_any | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
const bool | class_namespace, | ||
const char * | new_name | ||
) |
Definition at line 2561 of file schema_template.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, sm_template::attributes, AU_INDEX, check_namespace(), classobj_find_constraint_by_name(), classobj_free_class_constraints(), classobj_make_class_constraints(), classobj_map_constraint_to_property(), db_constraint_type(), DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, DB_PARTITIONED_CLASS, er_errid(), ER_ERROR_SEVERITY, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, ER_REGU_NOT_IMPLEMENTED, er_set(), ER_SM_CONSTRAINT_HAS_DIFFERENT_TYPE, ER_SM_CONSTRAINT_NOT_FOUND, ER_SM_INDEX_EXISTS, ER_SM_INHERITED, error(), ERROR1, ERROR2, find_any(), sm_class_constraint::fk_info, free_and_init, i, ID_ATTRIBUTE, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, sm_class_constraint::index_btid, is_global, sm_component::name, sm_class_constraint::name, sm_template::name, sm_component::name_space, NO_ERROR, NULL, sm_template::op, sm_template::properties, sm_foreign_key_info::ref_class_oid, rel_major_release_string(), sm_check_name(), SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_NAME, sm_downcase_name(), sm_exist_index(), sm_get_ch_name(), SM_INDEX_NAME, SM_IS_CONSTRAINT_EXCEPT_INDEX_FAMILY, sm_is_global_only_constraint(), SM_IS_INDEX_FAMILY, SM_MAX_IDENTIFIER_LENGTH, sm_partitioned_class_type(), sm_produce_constraint_name(), sm_update_class(), smt_edit_class_mop(), smt_find_attribute(), smt_find_owner_of_constraint(), smt_quit(), sm_class_constraint::type, ws_copy_string(), ws_free_string(), and ws_mop().
Referenced by db_rename_internal(), and dbt_rename().
int smt_rename_method_file | ( | SM_TEMPLATE * | template_, |
const char * | old_name, | ||
const char * | new_name | ||
) |
Definition at line 3553 of file schema_template.c.
References ARG_FILE_LINE, assert, er_errid(), er_set(), ER_SM_METHOD_FILE_NOT_FOUND, ER_WARNING_SEVERITY, error(), parser_context::file, sm_template::method_files, sm_method_file::name, sm_method_file::next, NO_ERROR, NULL, ws_copy_string(), and ws_free_string().
Referenced by dbt_rename_method_file().
int smt_reset_attribute_domain | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute | ||
) |
int smt_reset_method_files | ( | SM_TEMPLATE * | template_ | ) |
Definition at line 3488 of file schema_template.c.
References classobj_free_method_file(), error(), sm_template::method_files, NO_ERROR, NULL, and WS_LIST_FREE.
Referenced by db_drop_method_files(), and dbt_drop_method_files().
int smt_reset_query_spec | ( | SM_TEMPLATE * | template_ | ) |
Definition at line 3988 of file schema_template.c.
References classobj_free_query_spec(), error(), NO_ERROR, NULL, sm_template::query_spec, and WS_LIST_FREE.
Referenced by dbt_reset_query_spec().
int smt_set_attribute_default | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute, | ||
DB_VALUE * | value, | ||
DB_DEFAULT_EXPR * | default_expr | ||
) |
Definition at line 1319 of file schema_template.c.
References assert, classobj_copy_default_expr(), classobj_initialize_default_expr(), DB_DEFAULT_NONE, DB_IS_NULL, DB_TYPE_BLOB, DB_TYPE_CLOB, sm_default_value::default_expr, db_default_expr::default_expr_type, sm_attribute::default_value, sm_attribute::domain, DOMAIN_COMPATIBLE, ER_CANNOT_HAVE_PK_DEFAULT_NULL, er_errid(), ER_OBJ_DOMAIN_CONFLICT, ER_OBJ_STRING_OVERFLOW, ER_SM_DEFAULT_NOT_ALLOWED, error(), ERROR1, ERROR2, sm_attribute::flags, sm_attribute::header, pr_type::id, pr_type::name, sm_component::name, NO_ERROR, NULL, pr_clear_value(), pr_clone_value(), pr_free_ext_value(), pr_make_ext_value(), tp_domain::precision, SM_ATTFLAG_NEW, SM_ATTFLAG_PRIMARY_KEY, sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, smt_find_attribute(), smt_set_attribute_orig_default_value(), tp_check_value_size(), tp_domain_check(), TP_EXACT_MATCH, tp_value_cast(), sm_attribute::type, and sm_default_value::value.
Referenced by boot_define_index_key(), boot_define_serial(), db_add_attribute_internal(), db_change_default(), dbt_change_default(), do_alter_one_clause_with_template(), smt_add_attribute_w_dflt_w_order(), and smt_change_attribute_w_dflt_w_order().
int smt_set_attribute_on_update | ( | SM_TEMPLATE * | template_, |
const char * | name, | ||
int | class_attribute, | ||
DB_DEFAULT_EXPR_TYPE | on_update | ||
) |
Definition at line 1458 of file schema_template.c.
References error(), NO_ERROR, sm_attribute::on_update_default_expr, and smt_find_attribute().
Referenced by smt_add_attribute_w_dflt_w_order(), and smt_change_attribute_w_dflt_w_order().
int smt_set_loader_commands | ( | SM_TEMPLATE * | template_, |
const char * | commands | ||
) |
Definition at line 3601 of file schema_template.c.
References sm_template::loader_commands, NO_ERROR, ws_copy_string(), and ws_free_string().
Referenced by db_set_loader_commands(), and dbt_set_loader_commands().