CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <assert.h>
#include "db.h"
#include "dbtype.h"
#include "error_manager.h"
#include "system_parameter.h"
#include "server_interface.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 "view_transform.h"
#include "authenticate.h"
#include "locator_cl.h"
#include "virtual_object.h"
#include "parser.h"
#include "transaction_cl.h"
#include "trigger_manager.h"
#include "environment_variable.h"
#include "transform.h"
#include "execute_statement.h"
#include "network_interface_cl.h"
Go to the source code of this file.
Macros | |
#define | OBJ_INTERNAL_SAVEPOINT_NAME "*template-unique*" |
Functions | |
static DB_VALUE * | check_att_domain (SM_ATTRIBUTE *att, DB_VALUE *proposed_value) |
static int | check_constraints (SM_ATTRIBUTE *att, DB_VALUE *value, unsigned force_check_not_null) |
static int | quick_validate (SM_VALIDATION *valid, DB_VALUE *value) |
static void | cache_validation (SM_VALIDATION *valid, DB_VALUE *value) |
static void | begin_template_traversal (void) |
static OBJ_TEMPLATE * | make_template (MOP object, MOP classobj) |
static int | validate_template (OBJ_TEMPLATE *temp) |
static OBJ_TEMPASSIGN * | obt_make_assignment (OBJ_TEMPLATE *template_ptr, SM_ATTRIBUTE *att) |
static void | obt_free_assignment (OBJ_TEMPASSIGN *assign) |
static void | obt_free_template (OBJ_TEMPLATE *template_ptr) |
static int | populate_auto_increment (OBJ_TEMPLATE *template_ptr) |
static int | populate_defaults (OBJ_TEMPLATE *template_ptr) |
static int | obt_assign_obt (OBJ_TEMPLATE *template_ptr, SM_ATTRIBUTE *att, int base_assignment, OBJ_TEMPLATE *value) |
static MOP | create_template_object (OBJ_TEMPLATE *template_ptr) |
static int | access_object (OBJ_TEMPLATE *template_ptr, MOP *object, MOBJ *objptr) |
static int | obt_convert_set_templates (SETREF *setref, int check_uniques) |
static int | obt_final_check_set (SETREF *setref, int *has_uniques) |
static int | obt_final_check (OBJ_TEMPLATE *template_ptr, int check_non_null, int *has_uniques) |
static int | obt_apply_assignment (MOP op, SM_ATTRIBUTE *att, char *mem, DB_VALUE *value, int check_uniques) |
static int | obt_apply_assignments (OBJ_TEMPLATE *template_ptr, int check_uniques, int level) |
static MOP | make_temp_object (DB_OBJECT *class_, OBJ_TEMPLATE *object) |
static void | free_temp_object (MOP obj) |
int | obt_area_init (void) |
void | obt_area_final (void) |
int | obt_find_attribute (OBJ_TEMPLATE *template_ptr, int use_base_class, const char *name, SM_ATTRIBUTE **attp) |
DB_VALUE * | obt_check_assignment (SM_ATTRIBUTE *att, DB_VALUE *proposed_value, SM_VALIDATION *valid, unsigned force_check_not_null) |
OBJ_TEMPLATE * | obt_def_object (MOP class_mop) |
OBJ_TEMPLATE * | obt_edit_object (MOP object) |
int | obt_quit (OBJ_TEMPLATE *template_ptr) |
int | obt_assign (OBJ_TEMPLATE *template_ptr, SM_ATTRIBUTE *att, int base_assignment, DB_VALUE *value, SM_VALIDATION *valid) |
int | obt_set (OBJ_TEMPLATE *template_ptr, const char *attname, DB_VALUE *value) |
int | obt_set_obt (OBJ_TEMPLATE *template_ptr, const char *attname, OBJ_TEMPLATE *value) |
int | obt_desc_set (OBJ_TEMPLATE *template_ptr, SM_DESCRIPTOR *desc, DB_VALUE *value) |
int | obt_check_missing_assignments (OBJ_TEMPLATE *template_ptr) |
void | obt_set_label (OBJ_TEMPLATE *template_ptr, DB_VALUE *label) |
void | obt_disable_unique_checking (OBJ_TEMPLATE *template_ptr) |
void | obt_disable_serializable_conflict_checking (OBJ_TEMPLATE *template_ptr) |
bool | obt_enable_unique_checking (bool new_state) |
void | obt_set_force_flush (OBJ_TEMPLATE *template_ptr) |
void | obt_reset_force_flush (OBJ_TEMPLATE *template_ptr) |
void | obt_retain_after_finish (OBJ_TEMPLATE *template_ptr) |
int | obt_update_internal (OBJ_TEMPLATE *template_ptr, MOP *newobj, int check_non_null) |
int | obt_update (OBJ_TEMPLATE *template_ptr, MOP *newobj) |
int | obt_populate_known_arguments (OBJ_TEMPLATE *template_ptr) |
void | obt_begin_insert_values (void) |
Variables | |
bool | obt_Check_uniques = true |
bool | obt_Enable_autoincrement = true |
bool | obt_Last_insert_id_generated = false |
static AREA * | Template_area = NULL |
static AREA * | Assignment_area = NULL |
static unsigned int | obj_Template_traversal = 0 |
static unsigned int | template_savepoint_count = 0 |
#define OBJ_INTERNAL_SAVEPOINT_NAME "*template-unique*" |
Definition at line 65 of file object_template.c.
Referenced by obt_update_internal().
|
static |
Definition at line 1968 of file object_template.c.
References assert, au_fetch_instance_force(), AU_FETCH_UPDATE, obj_template::base_classobj, obj_template::base_object, obj_template::classobj, create_template_object(), er_errid(), error(), obj_template::is_class_update, LC_FETCH_MVCC_VERSION, NO_ERROR, NULL, obj_template::object, OBT_BASE_CLASSOBJ, obj_template::pruning_type, db_object::pruning_type, and ws_class_has_object_dependencies().
Referenced by obt_apply_assignments().
|
static |
Definition at line 721 of file object_template.c.
References obj_Template_traversal.
Referenced by obt_update_internal().
|
static |
Definition at line 544 of file object_template.c.
References db_get_class(), db_get_object(), db_get_set(), DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_precision(), db_value_scale(), DB_VALUE_TYPE, sm_validation::last_class, sm_validation::last_precision, sm_validation::last_scale, sm_validation::last_setdomain, sm_validation::last_type, ml_ext_add(), NULL, set_get_domain(), and sm_validation::validated_classes.
Referenced by obt_check_assignment().
|
static |
Definition at line 290 of file object_template.c.
References ARG_FILE_LINE, assert, DB_VALUE_DOMAIN_TYPE, sm_attribute::domain, DOMAIN_COMPATIBLE, DOMAIN_ERROR, DOMAIN_INCOMPATIBLE, DOMAIN_OVERFLOW, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_DOMAIN_CONFLICT, ER_OBJ_STRING_OVERFLOW, ER_REFERENCE_TO_NON_REFERABLE_NOT_ALLOWED, er_set(), sm_attribute::header, sm_component::name, NO_ERROR, NULL, pr_free_ext_value(), pr_make_ext_value(), tp_domain::precision, pt_is_reference_to_reusable_oid(), tp_domain_check(), tp_domain_status_er_set(), TP_DOMAIN_TYPE, TP_EXACT_MATCH, TP_IS_BIT_TYPE, TP_IS_CHAR_TYPE, and tp_value_cast().
Referenced by obt_check_assignment().
|
static |
Definition at line 387 of file object_template.c.
References assert, db_get_object(), DB_IS_NULL, sm_attribute::domain, DOMAIN_COMPATIBLE, ER_OBJ_ATTRIBUTE_CANT_BE_NULL, ER_OBJ_STRING_OVERFLOW, error(), ERROR1, ERROR2, sm_attribute::flags, sm_attribute::header, sm_component::name, NO_ERROR, NULL, tp_domain::precision, SM_ATTFLAG_AUTO_INCREMENT, SM_ATTFLAG_NON_NULL, tp_check_value_size(), tp_Type_object, tp_domain::type, and WS_MOP_IS_NULL.
Referenced by obt_check_assignment().
|
static |
Definition at line 1884 of file object_template.c.
References obj_template::base_class, obj_template::base_classobj, obj_template::base_object, obj_template::class_, sm_class::class_type, obj_template::classobj, db_make_object(), db_object::is_vid, obj_template::label, locator_add_instance(), NULL, obj_alloc(), obj_template::object, SM_VCLASS_CT, vid_add_virtual_instance(), vid_get_referenced_mop(), vid_is_base_instance(), and ws_class_has_object_dependencies().
Referenced by access_object().
|
static |
Definition at line 3021 of file object_template.c.
References db_object::class_mop, NULL, db_object::object, and ws_free_temp_mop().
Referenced by obt_apply_assignments().
|
static |
Definition at line 2982 of file object_template.c.
References ARG_FILE_LINE, db_object::class_mop, ER_ERROR_SEVERITY, ER_OBJ_INVALID_TEMP_OBJECT, er_set(), NULL, obj_template::object, db_object::object, vid_oid::oid, db_object::oid_info, db_object::pruning_type, and ws_make_temp_mop().
Referenced by obt_apply_assignments().
|
static |
Definition at line 742 of file object_template.c.
References area_alloc(), ARG_FILE_LINE, obj_template::assignments, sm_class::att_count, AU_ALTER, au_fetch_class(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, AU_INSERT, AU_TYPE, AU_UPDATE, obj_template::base_class, obj_template::base_classobj, obj_template::base_object, obj_template::check_serializable_conflict, obj_template::check_uniques, obj_template::class_, sm_class::class_attribute_count, sm_class::class_type, obj_template::classobj, DB_NOT_PARTITIONED_CLASS, obj_template::discard_on_finish, ER_ERROR_SEVERITY, ER_IT_NOT_UPDATABLE_STMT, er_set(), obj_template::fkeys_were_modified, obj_template::force_check_not_null, obj_template::force_flush, obj_template::function_key_modified, i, obj_template::is_autoincrement_set, obj_template::is_class_update, obj_template::is_old_template, obj_template::label, LC_FETCH_MVCC_VERSION, mode, mq_fetch_one_real_class(), mq_is_updatable(), obj_template::nassigns, NULL, obj_template::object, obt_Check_uniques, obj_template::pruning_type, obj_template::schema_id, sm_class::shared_count, obj_template::shared_was_modified, sm_local_schema_version(), SM_VCLASS_CT, tm_Tran_index, TM_TRAN_ISOLATION, obj_template::tran_id, TRAN_REPEATABLE_READ, obj_template::traversal, obj_template::traversed, obj_template::uniques_were_modified, vid_get_referenced_mop(), vid_is_base_instance(), and obj_template::write_lock.
Referenced by obt_def_object(), and obt_edit_object().
|
static |
Definition at line 2321 of file object_template.c.
References db_get_set(), sm_attribute::domain, error(), NO_ERROR, obj_assign_value(), obt_convert_set_templates(), TP_DOMAIN_TYPE, and TP_IS_SET_TYPE.
Referenced by obt_apply_assignments().
|
static |
Definition at line 2365 of file object_template.c.
References access_object(), assert, obj_template::assignments, obj_tempassign::att, au_fetch_instance_force(), AU_FETCH_UPDATE, obj_template::check_serializable_conflict, DB_CLIENT_TYPE_LOG_APPLIER, DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, db_elo_copy(), db_elo_delete(), db_get_client_type(), db_get_elo(), db_make_elo(), db_make_object(), DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_clear(), db_value_domain_init(), db_value_is_null(), db_value_type(), db_object::decached, er_errid(), error(), obj_template::fkeys_were_modified, obj_template::force_flush, free_temp_object(), obj_template::function_key_modified, sm_attribute::header, i, pr_type::id, ID_ATTRIBUTE, obj_template::is_old_template, db_object::is_vid, LC_FETCH_MVCC_VERSION, locator_flush_class(), locator_flush_instance(), make_temp_object(), db_elo::meta_data, sm_component::name_space, obj_template::nassigns, NO_ERROR, NULL, obj_tempassign::obj, obj_get_value(), obj_Template_traversal, obj_template::object, obt_apply_assignment(), OBT_BASE_CLASS, OBT_BASE_CLASSOBJ, OBT_BASE_OBJECT, sm_attribute::offset, vid_oid::oid, db_object::oid_info, OID_ISTEMP, obj_tempassign::old_value, pr_make_ext_value(), obj_template::shared_was_modified, sm_active_triggers(), sm_ch_name(), tr_abort(), tr_after_object(), tr_before_object(), TR_EVENT_ALL, TR_EVENT_INSERT, TR_EVENT_NULL, TR_EVENT_UPDATE, tr_prepare_class(), obj_template::traversal, tr_state::triggers, sm_attribute::triggers, sm_class::triggers, sm_attribute::type, obj_template::uniques_were_modified, validate_template(), obj_tempassign::variable, vid_flush_and_rehash(), vid_is_base_instance(), ws_decache(), ws_dirty(), WS_IS_DELETED, and ws_pin().
Referenced by obt_convert_set_templates(), and obt_update_internal().
void obt_area_final | ( | void | ) |
Definition at line 185 of file object_template.c.
References area_destroy(), and NULL.
Referenced by obt_area_init(), and ws_init().
int obt_area_init | ( | void | ) |
Definition at line 155 of file object_template.c.
References area_create(), assert, er_errid(), error(), NO_ERROR, NULL, and obt_area_final().
Referenced by ws_init().
int obt_assign | ( | OBJ_TEMPLATE * | template_ptr, |
SM_ATTRIBUTE * | att, | ||
int | base_assignment, | ||
DB_VALUE * | value, | ||
SM_VALIDATION * | valid | ||
) |
Definition at line 1522 of file object_template.c.
References assert, obj_template::assignments, obj_template::base_class, obj_template::base_classobj, obj_template::classobj, DB_AUTH_INSERT, DB_AUTH_UPDATE, db_make_null(), obj_template::discard_on_finish, er_errid(), ER_OBJ_DUPLICATE_ASSIGNMENT, ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, ERROR1, obj_template::force_check_not_null, sm_attribute::header, mq_update_attribute(), sm_component::name, NO_ERROR, NULL, obj_template::object, OBT_BASE_OBJECT, obt_check_assignment(), obt_find_attribute(), obt_make_assignment(), sm_attribute::order, pr_clear_value(), pr_clone_value(), pr_free_ext_value(), pr_make_ext_value(), validate_template(), and obj_tempassign::variable.
Referenced by obj_copy(), obj_set_att(), obj_set_temp(), obt_desc_set(), and obt_set().
|
static |
Definition at line 1668 of file object_template.c.
References assert, obj_template::assignments, obj_template::base_class, obj_template::base_classobj, obj_template::classobj, DB_AUTH_INSERT, DB_AUTH_UPDATE, db_make_null(), obj_template::discard_on_finish, sm_attribute::domain, er_errid(), ER_OBJ_ATTRIBUTE_TYPE_CONFLICT, ER_OBJ_DOMAIN_CONFLICT, ER_OBJ_DUPLICATE_ASSIGNMENT, ER_OBJ_INVALID_ARGUMENTS, ER_REFERENCE_TO_NON_REFERABLE_NOT_ALLOWED, error(), ERROR0, ERROR1, ERROR3, sm_attribute::header, mq_update_attribute(), pr_type::name, sm_component::name, NO_ERROR, NULL, obj_tempassign::obj, obj_template::object, obt_find_attribute(), obt_free_template(), obt_make_assignment(), sm_attribute::order, sm_check_class_domain(), sm_is_reuse_oid_class(), tp_Type_object, and tp_domain::type.
Referenced by obt_desc_set(), and obt_set().
void obt_begin_insert_values | ( | void | ) |
Definition at line 3089 of file object_template.c.
References obt_Last_insert_id_generated.
Referenced by do_execute_merge(), do_merge(), and insert_local().
DB_VALUE* obt_check_assignment | ( | SM_ATTRIBUTE * | att, |
DB_VALUE * | proposed_value, | ||
SM_VALIDATION * | valid, | ||
unsigned | force_check_not_null | ||
) |
Definition at line 649 of file object_template.c.
References cache_validation(), check_att_domain(), check_constraints(), NO_ERROR, NULL, pr_free_ext_value(), pr_make_ext_value(), and quick_validate().
Referenced by obj_set_att(), obj_set_shared(), and obt_assign().
int obt_check_missing_assignments | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2157 of file object_template.c.
References obj_template::assignments, obj_template::class_, DB_DEFAULT_NONE, DB_IS_NULL, sm_default_value::default_expr, db_default_expr::default_expr_type, sm_attribute::default_value, ER_OBJ_MISSING_NON_NULL_ASSIGN, ER_SM_OBJECT_ID_NOT_SET, error(), ERROR1, sm_attribute::flags, sm_attribute::header, sm_component::name, NO_ERROR, NULL, obj_template::object, OBT_BASE_CLASS, sm_attribute::order, sm_attribute::order_link, sm_class::ordered_attributes, SM_ATTFLAG_NON_NULL, SM_ATTFLAG_VID, sm_ch_name(), and sm_default_value::value.
Referenced by obt_final_check().
|
static |
Definition at line 2062 of file object_template.c.
References db_get_pointer(), db_make_object(), DB_TYPE_POINTER, DB_VALUE_TYPE, error(), i, NO_ERROR, NULL, obj_template::object, obt_apply_assignments(), obt_free_template(), db_set::set, set_size(), setobj_get_element_ptr(), and setobj_size().
Referenced by obt_apply_assignment().
OBJ_TEMPLATE* obt_def_object | ( | MOP | class_mop | ) |
Definition at line 1408 of file object_template.c.
References ARG_FILE_LINE, DB_FETCH_CLREAD_INSTWRITE, ER_ERROR_SEVERITY, ER_OBJ_NOT_A_CLASS, er_set(), is_class(), locator_is_class(), make_template(), and NULL.
Referenced by dbt_create_object_internal(), obj_copy(), and obj_create().
int obt_desc_set | ( | OBJ_TEMPLATE * | template_ptr, |
SM_DESCRIPTOR * | desc, | ||
DB_VALUE * | value | ||
) |
Definition at line 1834 of file object_template.c.
References assert, obj_template::classobj, db_get_pointer(), DB_TYPE_POINTER, DB_VALUE_TYPE, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obt_assign(), obt_assign_obt(), sm_get_descriptor_component(), sm_descriptor::valid, and validate_template().
Referenced by dbt_dput_internal().
void obt_disable_serializable_conflict_checking | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2781 of file object_template.c.
References obj_template::check_serializable_conflict.
Referenced by update_object_tuple().
void obt_disable_unique_checking | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2766 of file object_template.c.
References obj_template::check_uniques.
Referenced by update_object_tuple().
OBJ_TEMPLATE* obt_edit_object | ( | MOP | object | ) |
Definition at line 1439 of file object_template.c.
References ARG_FILE_LINE, DB_FETCH_CLREAD_INSTWRITE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_TEMP_OBJECT, er_set(), is_class(), db_object::is_temp, locator_is_class(), make_template(), NULL, and sm_get_class().
Referenced by dbt_edit_object(), and obj_set_att().
Definition at line 2801 of file object_template.c.
References obt_Check_uniques.
Referenced by ldr_init().
|
static |
Definition at line 2207 of file object_template.c.
References assert, obj_template::assignments, db_get_set(), DB_VALUE_TYPE, er_errid(), error(), i, obj_template::is_class_update, obj_template::nassigns, NO_ERROR, NULL, obj_tempassign::obj, obj_Template_traversal, obj_template::object, obt_check_missing_assignments(), obt_Enable_autoincrement, obt_final_check_set(), populate_auto_increment(), populate_defaults(), TP_IS_SET_TYPE, obj_template::traversal, obj_template::uniques_were_modified, validate_template(), and obj_tempassign::variable.
Referenced by obt_final_check_set(), and obt_update_internal().
|
static |
Definition at line 2113 of file object_template.c.
References db_get_pointer(), DB_TYPE_POINTER, DB_VALUE_TYPE, error(), i, NO_ERROR, NULL, obt_final_check(), db_set::set, set_size(), setobj_get_element_ptr(), and setobj_size().
Referenced by obt_final_check().
int obt_find_attribute | ( | OBJ_TEMPLATE * | template_ptr, |
int | use_base_class, | ||
const char * | name, | ||
SM_ATTRIBUTE ** | attp | ||
) |
Definition at line 215 of file object_template.c.
References ARG_FILE_LINE, AU_ALTER, au_fetch_class(), AU_FETCH_UPDATE, obj_template::base_class, obj_template::base_classobj, obj_template::class_, obj_template::classobj, classobj_find_attribute(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ATTRIBUTE, ER_OBJ_TEMPLATE_INTERNAL, er_set(), error(), ERROR1, sm_attribute::header, ID_SHARED_ATTRIBUTE, obj_template::is_class_update, sm_component::name_space, NO_ERROR, NULL, and obj_template::write_lock.
Referenced by obt_assign(), obt_assign_obt(), obt_set(), and populate_defaults().
|
static |
Definition at line 1010 of file object_template.c.
References area_free(), db_get_pointer(), db_get_set(), db_make_pointer(), DB_TYPE_POINTER, DB_VALUE_TYPE, i, NULL, obt_free_template(), obj_tempassign::old_value, pr_free_ext_value(), db_set::set, set_size(), setobj_get_element_ptr(), setobj_size(), TP_IS_SET_TYPE, and obj_tempassign::variable.
Referenced by obt_free_template().
|
static |
Definition at line 1075 of file object_template.c.
References area_free(), obj_template::assignments, free_and_init, i, obj_template::nassigns, NULL, obj_tempassign::obj, obt_free_assignment(), and obj_template::traversed.
Referenced by obt_assign_obt(), obt_convert_set_templates(), obt_free_assignment(), obt_quit(), and obt_update_internal().
|
static |
Definition at line 960 of file object_template.c.
References area_alloc(), obj_template::assignments, obj_tempassign::att, classobj_get_cached_constraint(), classobj_has_function_constraint(), classobj_has_unique_constraint(), sm_attribute::constraints, obj_template::fkeys_were_modified, obj_template::function_key_modified, sm_attribute::header, ID_SHARED_ATTRIBUTE, obj_tempassign::is_auto_increment, obj_tempassign::is_default, sm_component::name_space, NULL, obj_tempassign::obj, obj_tempassign::old_value, sm_attribute::order, obj_template::shared_was_modified, SM_CONSTRAINT_FOREIGN_KEY, obj_template::uniques_were_modified, and obj_tempassign::variable.
Referenced by obt_assign(), obt_assign_obt(), populate_auto_increment(), and populate_defaults().
int obt_populate_known_arguments | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 3049 of file object_template.c.
References assert, er_errid(), obj_template::is_class_update, NO_ERROR, obt_Enable_autoincrement, populate_auto_increment(), populate_defaults(), and validate_template().
Referenced by do_find_unique_constraint_violations().
int obt_quit | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 1489 of file object_template.c.
References NO_ERROR, NULL, and obt_free_template().
Referenced by dbt_abort_object(), do_insert_template(), insert_subquery_results(), obj_copy(), obj_create(), obj_set_att(), and pt_set_value_to_db().
void obt_reset_force_flush | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2830 of file object_template.c.
References assert, obj_template::force_flush, and NULL.
void obt_retain_after_finish | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2844 of file object_template.c.
References assert, obj_template::discard_on_finish, and NULL.
Referenced by do_insert_template(), and insert_subquery_results().
int obt_set | ( | OBJ_TEMPLATE * | template_ptr, |
const char * | attname, | ||
DB_VALUE * | value | ||
) |
Definition at line 1767 of file object_template.c.
References assert, db_get_pointer(), DB_TYPE_POINTER, DB_VALUE_TYPE, er_errid(), ER_OBJ_INVALID_ARGUMENTS, error(), ERROR0, NO_ERROR, NULL, obt_assign(), obt_assign_obt(), obt_find_attribute(), and validate_template().
Referenced by dbt_put_internal(), and obt_set_obt().
void obt_set_force_flush | ( | OBJ_TEMPLATE * | template_ptr | ) |
Definition at line 2816 of file object_template.c.
References assert, obj_template::force_flush, and NULL.
Referenced by do_insert_template(), insert_subquery_results(), and update_object_tuple().
void obt_set_label | ( | OBJ_TEMPLATE * | template_ptr, |
DB_VALUE * | label | ||
) |
Definition at line 2748 of file object_template.c.
References obj_template::label.
Referenced by dbt_set_label().
int obt_set_obt | ( | OBJ_TEMPLATE * | template_ptr, |
const char * | attname, | ||
OBJ_TEMPLATE * | value | ||
) |
Definition at line 1813 of file object_template.c.
References db_make_pointer(), and obt_set().
Referenced by dbt_put_internal().
int obt_update | ( | OBJ_TEMPLATE * | template_ptr, |
MOP * | newobj | ||
) |
Definition at line 2968 of file object_template.c.
References obt_update_internal().
Referenced by dbt_finish_object(), dbt_finish_object_and_decache_when_failure(), and obj_set_att().
int obt_update_internal | ( | OBJ_TEMPLATE * | template_ptr, |
MOP * | newobj, | ||
int | check_non_null | ||
) |
Definition at line 2860 of file object_template.c.
References assert, begin_template_traversal(), obj_template::check_uniques, DB_CLIENT_TYPE_LOG_APPLIER, db_get_client_type(), obj_template::discard_on_finish, er_errid(), ER_LK_UNILATERALLY_ABORTED, error(), obj_template::fkeys_were_modified, obj_template::force_flush, obj_template::function_key_modified, NO_ERROR, NULL, OBJ_INTERNAL_SAVEPOINT_NAME, obj_template::object, obt_apply_assignments(), obt_final_check(), obt_free_template(), template_savepoint_count, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and validate_template().
Referenced by obj_copy(), obj_create(), and obt_update().
|
static |
Definition at line 1126 of file object_template.c.
References ARG_FILE_LINE, assert, obj_template::assignments, sm_attribute::auto_increment, AUTO_INCREMENT_SERIAL_NAME_MAX_LENGTH, obj_template::class_, sm_attribute::class_mop, CT_SERIAL_NAME, DB_IS_NULL, db_make_null(), db_value_domain_init(), do_get_serial_cached_num(), do_get_serial_obj_id(), do_Trigger_involved, sm_attribute::domain, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ATTRIBUTE, er_set(), error(), sm_attribute::flags, GENERATE_AUTO_INCREMENT, GENERATE_SERIAL, sm_attribute::header, pr_type::id, obj_tempassign::is_auto_increment, obj_template::is_autoincrement_set, obj_template::is_class_update, sm_component::name, NO_ERROR, NULL, numeric_db_value_coerce_from_num(), obt_Last_insert_id_generated, obt_make_assignment(), vid_oid::oid, db_object::oid_info, sm_attribute::order, sm_attribute::order_link, sm_class::ordered_attributes, pr_make_ext_value(), tp_domain::precision, tp_domain::scale, serial_get_next_value(), SET_AUTO_INCREMENT_SERIAL_NAME, SM_ATTFLAG_AUTO_INCREMENT, sm_find_class(), sm_get_ch_name(), sm_attribute::type, and obj_tempassign::variable.
Referenced by obt_final_check(), and obt_populate_known_arguments().
|
static |
Definition at line 1266 of file object_template.c.
References assert, obj_template::assignments, sm_class::attributes, obj_template::base_class, obj_template::base_classobj, obj_template::class_, obj_template::classobj, DB_AUTH_INSERT, DB_IS_NULL, db_make_null(), DB_TYPE_NULL, DB_VALUE_TYPE, sm_attribute::default_value, er_errid(), sm_attribute::header, obj_template::is_class_update, obj_tempassign::is_default, mq_is_updatable_attribute(), mq_update_attribute(), sm_component::name, sm_component::next, NO_ERROR, NULL, obt_find_attribute(), obt_make_assignment(), sm_attribute::order, pr_clone_value(), pr_make_ext_value(), sm_default_value::value, and obj_tempassign::variable.
Referenced by obt_final_check(), and obt_populate_known_arguments().
|
static |
Definition at line 435 of file object_template.c.
References DB_GET_BIT_PRECISION, db_get_class(), DB_GET_NUMERIC_PRECISION, DB_GET_NUMERIC_SCALE, db_get_object(), db_get_set(), DB_GET_STRING_PRECISION, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_TYPE, sm_validation::last_class, sm_validation::last_precision, sm_validation::last_scale, sm_validation::last_setdomain, sm_validation::last_type, ml_find(), NULL, set_get_domain(), and sm_validation::validated_classes.
Referenced by obt_check_assignment().
|
static |
Definition at line 936 of file object_template.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_TEMPLATE, er_set(), error(), NO_ERROR, NULL, obj_template::schema_id, sm_local_schema_version(), tm_Tran_index, and obj_template::tran_id.
Referenced by obt_apply_assignments(), obt_assign(), obt_desc_set(), obt_final_check(), obt_populate_known_arguments(), obt_set(), and obt_update_internal().
Definition at line 107 of file object_template.c.
|
static |
Definition at line 115 of file object_template.c.
Referenced by begin_template_traversal(), obt_apply_assignments(), and obt_final_check().
bool obt_Check_uniques = true |
Definition at line 75 of file object_template.c.
Referenced by make_template(), and obt_enable_unique_checking().
bool obt_Enable_autoincrement = true |
Definition at line 81 of file object_template.c.
Referenced by loaddb_internal(), obt_final_check(), and obt_populate_known_arguments().
bool obt_Last_insert_id_generated = false |
Definition at line 88 of file object_template.c.
Referenced by insert_local(), obt_begin_insert_values(), populate_auto_increment(), and pt_evaluate_db_value_expr().
Definition at line 106 of file object_template.c.
|
static |
Definition at line 120 of file object_template.c.
Referenced by obt_update_internal().