CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <errno.h>
#include <assert.h>
#include "area_alloc.h"
#include "object_domain.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "numeric_opfunc.h"
#include "tz_support.h"
#include "db_date.h"
#include "mprec.h"
#include "porting_inline.hpp"
#include "set_object.h"
#include "string_opfunc.h"
#include "chartype.h"
#include "db_json.hpp"
#include "work_space.h"
#include "virtual_object.h"
#include "schema_manager.h"
#include "locator_cl.h"
#include "object_template.h"
#include "dbi.h"
#include "dbtype.h"
#include "error_manager.h"
Go to the source code of this file.
Macros | |
#define | ARE_COMPARABLE(typ1, typ2) |
#define | DBL_MAX_DIGITS ((int)ceil(DBL_MAX_EXP * log10((double) FLT_RADIX))) |
#define | TP_NEAR_MATCH(t1, t2) |
#define | TP_NUM_MIDXKEY_DOMAIN_LIST (10) |
#define | DB_DATETIMETZ_INITIALIZER { {0, 0}, 0 } |
#define | DOMAIN_INIT |
#define | DOMAIN_INIT2(codeset, coll) |
#define | DOMAIN_INIT3 |
#define | DOMAIN_INIT4(prec, scale) |
#define | BITS_IN_BYTE 8 |
#define | HEX_IN_BYTE 2 |
#define | BITS_IN_HEX 4 |
#define | BYTE_COUNT(bit_cnt) (((bit_cnt)+BITS_IN_BYTE-1)/BITS_IN_BYTE) |
#define | BYTE_COUNT_HEX(bit_cnt) (((bit_cnt)+BITS_IN_HEX-1)/BITS_IN_HEX) |
#define | ROUND(x) ((x) > 0 ? ((x) + .5) : ((x) - .5)) |
#define | SECONDS_IN_A_DAY (long)(86400) /* 24L * 60L * 60L */ |
#define | TP_IS_CHAR_STRING(db_val_type) |
#define | TP_IS_LOB(db_val_type) (db_val_type == DB_TYPE_BLOB || db_val_type == DB_TYPE_CLOB) |
#define | TP_IS_DATETIME_TYPE(db_val_type) TP_IS_DATE_OR_TIME_TYPE (db_val_type) |
#define | TP_IMPLICIT_COERCION_NOT_ALLOWED(src_type, dest_type) |
#define | HIGHEST_4BITS_OF_UBI 0xF000000000000000 |
#define | HIGHEST_BIT_OF_UINT64 0x8000000000000000 |
#define | HIGHEST_3BITS_OF_UBI 0xE000000000000000 |
Typedefs | |
typedef enum tp_coersion_mode | TP_COERCION_MODE |
Enumerations | |
enum | tp_coersion_mode { TP_EXPLICIT_COERCION = 0, TP_IMPLICIT_COERCION, TP_FORCE_COERCION } |
#define ARE_COMPARABLE | ( | typ1, | |
typ2 | |||
) |
Definition at line 74 of file object_domain.c.
Referenced by tp_value_compare_with_error().
#define BITS_IN_BYTE 8 |
Definition at line 5600 of file object_domain.c.
#define BITS_IN_HEX 4 |
Definition at line 5602 of file object_domain.c.
Referenced by bfmt_print().
#define BYTE_COUNT | ( | bit_cnt | ) | (((bit_cnt)+BITS_IN_BYTE-1)/BITS_IN_BYTE) |
Definition at line 5604 of file object_domain.c.
Referenced by bfmt_print().
#define BYTE_COUNT_HEX | ( | bit_cnt | ) | (((bit_cnt)+BITS_IN_HEX-1)/BITS_IN_HEX) |
Definition at line 5605 of file object_domain.c.
Referenced by bfmt_print().
#define DB_DATETIMETZ_INITIALIZER { {0, 0}, 0 } |
Definition at line 92 of file object_domain.c.
Referenced by tp_value_coerce_strict().
#define DBL_MAX_DIGITS ((int)ceil(DBL_MAX_EXP * log10((double) FLT_RADIX))) |
Definition at line 79 of file object_domain.c.
Referenced by tp_value_cast_internal().
#define DOMAIN_INIT |
Definition at line 157 of file object_domain.c.
#define DOMAIN_INIT2 | ( | codeset, | |
coll | |||
) |
Definition at line 176 of file object_domain.c.
#define DOMAIN_INIT3 |
Definition at line 196 of file object_domain.c.
#define DOMAIN_INIT4 | ( | prec, | |
scale | |||
) |
Definition at line 215 of file object_domain.c.
#define HEX_IN_BYTE 2 |
Definition at line 5601 of file object_domain.c.
#define HIGHEST_3BITS_OF_UBI 0xE000000000000000 |
Referenced by tp_ubi_times_ten().
#define HIGHEST_4BITS_OF_UBI 0xF000000000000000 |
Referenced by tp_hex_str_to_bi().
#define HIGHEST_BIT_OF_UINT64 0x8000000000000000 |
Referenced by tp_ubi_to_bi_with_args().
#define ROUND | ( | x | ) | ((x) > 0 ? ((x) + .5) : ((x) - .5)) |
Definition at line 5686 of file object_domain.c.
Referenced by tp_value_cast_internal().
#define SECONDS_IN_A_DAY (long)(86400) /* 24L * 60L * 60L */ |
Definition at line 5687 of file object_domain.c.
Referenced by tp_value_cast_internal().
#define TP_IMPLICIT_COERCION_NOT_ALLOWED | ( | src_type, | |
dest_type | |||
) |
Definition at line 5697 of file object_domain.c.
Referenced by tp_value_cast_internal().
#define TP_IS_CHAR_STRING | ( | db_val_type | ) |
Definition at line 5688 of file object_domain.c.
Referenced by tp_value_string_to_double().
#define TP_IS_DATETIME_TYPE | ( | db_val_type | ) | TP_IS_DATE_OR_TIME_TYPE (db_val_type) |
Definition at line 5695 of file object_domain.c.
Referenced by tp_value_coerce_strict().
#define TP_IS_LOB | ( | db_val_type | ) | (db_val_type == DB_TYPE_BLOB || db_val_type == DB_TYPE_CLOB) |
Definition at line 5692 of file object_domain.c.
#define TP_NEAR_MATCH | ( | t1, | |
t2 | |||
) |
Definition at line 81 of file object_domain.c.
Referenced by tp_domain_match_internal(), and tp_is_domain_cached().
#define TP_NUM_MIDXKEY_DOMAIN_LIST (10) |
Definition at line 90 of file object_domain.c.
Referenced by tp_domain_get_list_ptr().
typedef enum tp_coersion_mode TP_COERCION_MODE |
enum tp_coersion_mode |
Enumerator | |
---|---|
TP_EXPLICIT_COERCION | |
TP_IMPLICIT_COERCION | |
TP_FORCE_COERCION |
Definition at line 94 of file object_domain.c.
Definition at line 5617 of file object_domain.c.
References BITS_IN_HEX, BYTE_COUNT, BYTE_COUNT_HEX, db_get_bit(), error(), and NO_ERROR.
Referenced by tp_value_cast_internal().
|
static |
|
static |
Definition at line 5742 of file object_domain.c.
References assert, tp_domain::collation_flag, db_char_string_coerce(), db_make_char(), db_make_nchar(), db_make_varchar(), db_make_varnchar(), DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DOMAIN_COMPATIBLE, DOMAIN_INCOMPATIBLE, db_value::need_clear, NO_ERROR, pr_clear_value(), tp_domain::precision, strlen, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLL_NORMAL, and TP_DOMAIN_COLLATION.
Referenced by tp_value_cast_internal().
|
static |
Definition at line 10317 of file object_domain.c.
References DB_EQ, DB_GT, DB_LT, and oid_compare().
Referenced by tp_value_compare_with_error().
void tp_apply_sys_charset | ( | void | ) |
Definition at line 677 of file object_domain.c.
References tp_domain::codeset, tp_domain::collation_id, LANG_SYS_CODESET, LANG_SYS_COLLATION, and NULL.
Referenced by lang_set_charset(), and lang_set_charset_lang().
|
static |
Definition at line 4992 of file object_domain.c.
References char_isdigit(), char_isspace(), db_get_string(), db_get_string_codeset(), db_get_string_size(), ER_FAILED, i, intl_skip_spaces(), NO_ERROR, NULL, p, tp_digit_number_str_to_bi(), tp_hex_str_to_bi(), and tp_scientific_str_to_bi().
Referenced by tp_value_cast_internal().
Definition at line 4728 of file object_domain.c.
References db_date_parse_date(), db_get_string(), db_get_string_size(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
|
static |
Definition at line 4825 of file object_domain.c.
References db_get_string(), db_get_string_size(), db_string_to_datetimetz_ex(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
|
static |
Definition at line 4886 of file object_domain.c.
References ARG_FILE_LINE, CAST_BUFLEN, char_isspace(), DATA_STATUS_NOT_CONSUMED, DATA_STATUS_OK, DATA_STATUS_TRUNCATED, db_get_string(), db_get_string_codeset(), db_get_string_size(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, intl_skip_spaces(), NO_ERROR, NULL, NUM_BUF_SIZE, p, and string_to_double.
Referenced by tp_value_cast_internal(), tp_value_coerce_strict(), and tp_value_string_to_double().
Definition at line 4850 of file object_domain.c.
References db_get_string(), db_get_string_codeset(), db_get_string_size(), ER_FAILED, NO_ERROR, NULL, and numeric_coerce_string_to_num().
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
Definition at line 4703 of file object_domain.c.
References db_date_parse_time(), db_get_string(), db_get_string_size(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
|
static |
Definition at line 4776 of file object_domain.c.
References db_get_string(), db_get_string_size(), db_string_to_timestamptz_ex(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
|
static |
Definition at line 4801 of file object_domain.c.
References db_date_parse_datetime(), db_get_string(), db_get_string_size(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
Definition at line 4752 of file object_domain.c.
References db_date_parse_utime, db_get_string(), db_get_string_size(), ER_FAILED, and NO_ERROR.
Referenced by tp_value_cast_internal(), and tp_value_coerce_strict().
Definition at line 4563 of file object_domain.c.
References ARG_FILE_LINE, tp_domain::collation_flag, DB_GET_COMPRESSED_STRING, db_get_string(), db_get_string_codeset(), db_get_string_collation(), db_get_string_length(), db_get_string_size(), DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), INTL_CAN_STEAL_CS, LANG_IS_COERCIBLE_COLL, NO_ERROR, NULL, tp_domain::precision, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_ENFORCE, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLLATION, TP_DOMAIN_TYPE, TP_FLOATING_PRECISION_VALUE, TP_IS_CHAR_BIT_TYPE, and TP_IS_CHAR_TYPE.
Referenced by tp_value_cast_internal().
TP_DOMAIN_STATUS tp_check_value_size | ( | TP_DOMAIN * | domain, |
DB_VALUE * | value | ||
) |
Definition at line 11119 of file object_domain.c.
References assert, tp_domain::class_mop, tp_domain::class_oid, tp_domain::collation_id, db_get_class_name(), db_get_string(), db_get_string_length(), db_get_string_size(), DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SUB, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, db_value_precision(), DOMAIN_COMPATIBLE, DOMAIN_OVERFLOW, lang_get_collation_name(), pr_type::name, tp_domain::next, NULL, OID_ISNULL, db_identifier::pageid, tp_domain::precision, tp_domain::scale, tp_domain::setdomain, db_identifier::slotid, TP_DOMAIN_TYPE, TP_FLOATING_PRECISION_VALUE, TP_IS_BIT_TYPE, tp_domain::type, and db_identifier::volid.
Referenced by check_constraints(), and smt_set_attribute_default().
|
static |
Definition at line 11699 of file object_domain.c.
References assert, char_isdigit(), DATA_STATUS_OK, DATA_STATUS_TRUNCATED, DB_BIGINT_MAX, DB_BIGINT_MIN, ER_FAILED, intl_skip_spaces(), NO_ERROR, NULL, and p.
Referenced by tp_atobi().
Definition at line 3545 of file object_domain.c.
References tp_domain::class_mop, DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DB_VALUE, DB_TYPE_DOUBLE, DB_TYPE_ERROR, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SUB, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, error(), tp_domain::next, NO_ERROR, NULL, tp_domain::precision, tp_domain::scale, tp_domain_free(), and TP_DOMAIN_TYPE.
Referenced by pt_coerce_node_collation(), pt_node_data_type_to_db_domain(), pt_node_to_db_domain(), setobj_build_domain_from_col(), smt_add_set_argument_domain(), smt_add_set_attribute_domain(), and tp_value_cast_internal().
Definition at line 3663 of file object_domain.c.
References error(), tp_domain::next, NO_ERROR, and NULL.
Referenced by pt_node_to_db_domain().
Definition at line 2932 of file object_domain.c.
References tp_domain::is_cached, tp_domain::next_list, NULL, pthread_mutex_lock, pthread_mutex_unlock, rv, tp_domain_free(), tp_domain_get_list_ptr(), TP_DOMAIN_TYPE, TP_EXACT_MATCH, tp_is_domain_cached(), and tp_swizzle_oid().
Referenced by catcls_get_or_value_from_domain(), construct_index_key_domain(), disk_to_domain(), do_create_midxkey_for_constraint(), fixup_attribute_self_domain(), fixup_method_self_domains(), heap_attrvalue_get_key(), heap_eval_function_index(), heap_midxkey_key_get(), init_db_attribute_list(), locator_add_or_remove_index_internal(), or_get_domain(), or_get_domain_and_cache(), or_unpack_query_format(), pt_assignment_compatible(), pt_check_partitions(), pt_coerce_expression_argument(), pt_coerce_insert_values(), pt_coerce_node_collation(), pt_coerce_value_internal(), pt_eval_expr_type(), pt_eval_type(), pt_evaluate_db_value_expr(), pt_evaluate_tree_internal(), pt_make_method_call(), pt_make_regu_hostvar(), pt_node_to_function_index(), pt_to_regu_variable(), pt_value_to_db(), pt_xasl_data_type_to_domain(), pt_xasl_node_to_domain(), pt_xasl_type_enum_to_domain(), qo_reduce_equality_terms(), qo_seg_width(), scan_dbvals_to_midxkey(), smt_add_set_attribute_domain(), tp_domain_resolve(), tp_domain_resolve_default_w_coll(), tp_domain_resolve_value(), tp_infer_common_domain(), tp_value_change_coll_and_codeset(), tp_value_compare_with_error(), and unpack_domain().
TP_DOMAIN_STATUS tp_domain_check | ( | const TP_DOMAIN * | domain, |
const DB_VALUE * | value, | ||
TP_MATCH | exact_match | ||
) |
Definition at line 4516 of file object_domain.c.
References DOMAIN_COMPATIBLE, DOMAIN_INCOMPATIBLE, NULL, and tp_domain_select().
Referenced by assign_set_value(), check_att_domain(), heap_attrinfo_set(), setobj_check_domain(), setobj_ismember(), smt_change_attribute_w_dflt_w_order(), smt_change_class_shared_attribute_domain(), smt_set_attribute_default(), and tp_domain_resolve_value().
|
static |
Definition at line 3810 of file object_domain.c.
References ASSERT_ERROR, tp_domain::class_mop, DB_FETCH_READ, db_on_server, er_errid(), error(), LC_DOESNOT_EXIST, LC_ERROR, locator_does_exist_object(), NO_ERROR, NULL, tp_Type_object, tp_domain::type, and WS_SET_DELETED.
Referenced by tp_domain_filter_list().
void tp_domain_clear_enumeration | ( | DB_ENUMERATION * | enumeration | ) |
Definition at line 793 of file object_domain.c.
References db_enumeration::count, DB_GET_ENUM_ELEM_STRING, db_enumeration::elements, free_and_init, i, and NULL.
Referenced by pt_data_type_to_db_domain(), pt_node_data_type_to_db_domain(), tp_domain_free(), and unpack_domain().
Definition at line 4046 of file object_domain.c.
References tp_domain::next, and NULL.
Referenced by build_attr_change_map(), setobj_check_domain(), tp_domain_find_compatible(), and tp_value_cast_internal().
TP_DOMAIN* tp_domain_construct | ( | DB_TYPE | domain_type, |
DB_OBJECT * | class_obj, | ||
int | precision, | ||
int | scale, | ||
TP_DOMAIN * | setdomain | ||
) |
Definition at line 1074 of file object_domain.c.
References assert, assert_release, tp_domain::class_mop, tp_domain::class_oid, DB_DEFAULT_PRECISION, DB_TYPE_MIDXKEY, tp_domain::is_cached, tp_domain::json_validator, tp_domain::next, NULL, vid_oid::oid, db_object::oid_info, tp_domain::precision, tp_domain::scale, tp_domain::self_ref, tp_domain::setdomain, tp_domain_new(), TP_DOMAIN_SELF_REF, tp_domain_size(), and tp_get_fixed_precision().
Referenced by catcls_get_or_value_from_domain(), construct_index_key_domain(), do_create_midxkey_for_constraint(), get_domain_internal(), heap_attrvalue_get_key(), heap_midxkey_key_get(), locator_add_or_remove_index_internal(), pt_data_type_to_db_domain(), pt_node_data_type_to_db_domain(), pt_node_to_db_domain(), pt_type_enum_to_db_domain(), scan_dbvals_to_midxkey(), unpack_domain(), and unpack_domain_2().
Definition at line 1270 of file object_domain.c.
References tp_domain::class_mop, tp_domain::class_oid, tp_domain::codeset, tp_domain::collation_id, CONST_CAST, db_json_copy_validator(), DB_TYPE_ENUMERATION, DB_TYPE_JSON, DOM_GET_ENUMERATION, error(), pr_type::id, tp_domain::is_cached, tp_domain::is_desc, tp_domain::is_parameterized, tp_domain::json_validator, tp_domain::next, NO_ERROR, NULL, tp_domain::precision, tp_domain::scale, tp_domain::self_ref, tp_domain::setdomain, tp_domain_copy(), tp_domain_copy_enumeration(), tp_domain_free(), tp_domain_new(), TP_DOMAIN_TYPE, and tp_domain::type.
Referenced by classobj_copy_method_arg(), classobj_init_attribute(), construct_index_key_domain(), do_alter_index_rebuild(), do_create_midxkey_for_constraint(), heap_midxkey_key_get(), locator_add_or_remove_index_internal(), pt_assignment_compatible(), pt_coerce_node_collation(), pt_make_regu_hostvar(), scan_dbvals_to_midxkey(), setobj_build_domain_from_col(), sm_save_function_index_info(), smt_add_set_attribute_domain(), tp_domain_copy(), tp_domain_resolve_default_w_coll(), tp_infer_common_domain(), tp_value_cast_internal(), tp_value_change_coll_and_codeset(), and tp_value_compare_with_error().
int tp_domain_copy_enumeration | ( | DB_ENUMERATION * | dest, |
const DB_ENUMERATION * | src | ||
) |
Definition at line 1155 of file object_domain.c.
References ARG_FILE_LINE, assert, db_enumeration::collation_id, db_enumeration::count, DB_GET_ENUM_ELEM_CODESET, DB_GET_ENUM_ELEM_SHORT, DB_GET_ENUM_ELEM_STRING, DB_GET_ENUM_ELEM_STRING_SIZE, DB_SET_ENUM_ELEM_CODESET, DB_SET_ENUM_ELEM_SHORT, DB_SET_ENUM_ELEM_STRING, DB_SET_ENUM_ELEM_STRING_SIZE, db_enumeration::elements, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_WARNING_SEVERITY, error(), free_and_init, i, NO_ERROR, and NULL.
Referenced by construct_index_key_domain(), and tp_domain_copy().
int tp_domain_disk_size | ( | TP_DOMAIN * | domain | ) |
Definition at line 11038 of file object_domain.c.
References assert, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, pr_type::get_disk_size_of_mem(), pr_type::get_id(), pr_type::is_always_variable(), NULL, tp_domain::precision, TP_FLOATING_PRECISION_VALUE, and tp_domain::type.
Referenced by classobj_install_template(), get_desc_current(), heap_attrinfo_get_disksize(), heap_attrinfo_transform_to_disk_internal(), heap_attrvalue_read(), la_get_current(), object_disk_size(), or_disk_set_size(), or_get_all_representation(), or_get_current_representation(), or_get_old_representation(), or_get_set(), or_packed_set_info(), order_atts_by_alignment(), put_attributes(), put_varinfo(), qo_seg_width(), and tf_compile_meta_classes().
Definition at line 3694 of file object_domain.c.
References tp_domain::class_mop, DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DB_VALUE, DB_TYPE_DOUBLE, DB_TYPE_ERROR, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SUB, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, tp_domain::next, NULL, tp_domain::precision, tp_domain::scale, tp_domain_free(), and TP_DOMAIN_TYPE.
Referenced by smt_delete_set_attribute_domain().
int tp_domain_filter_list | ( | TP_DOMAIN * | dlist, |
int * | list_changes | ||
) |
Definition at line 3867 of file object_domain.c.
References tp_domain::class_mop, error(), tp_domain::next, NO_ERROR, NULL, pr_is_set_type(), tp_domain::setdomain, tp_domain_check_class(), tp_domain_filter_list(), tp_domain_free(), TP_DOMAIN_TYPE, tp_Type_object, and tp_domain::type.
Referenced by sm_filter_domain(), and tp_domain_filter_list().
TP_DOMAIN* tp_domain_find_charbit | ( | DB_TYPE | type, |
int | codeset, | ||
int | collation_id, | ||
unsigned char | collation_flag, | ||
int | precision, | ||
bool | is_desc | ||
) |
Definition at line 2647 of file object_domain.c.
References assert, tp_domain::codeset, tp_domain::collation_flag, tp_domain::collation_id, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, tp_domain::is_desc, tp_domain::next_list, NULL, tp_domain::precision, and tp_domain_get_list().
Referenced by heap_attrvalue_get_key(), and unpack_domain().
|
static |
Definition at line 4002 of file object_domain.c.
References DB_TYPE_VARIABLE, tp_domain::next, NULL, tp_domain::setdomain, tp_domain_compatible(), tp_domain_match(), TP_DOMAIN_TYPE, TP_EXACT_MATCH, and TP_IS_SET_TYPE.
TP_DOMAIN* tp_domain_find_enumeration | ( | const DB_ENUMERATION * | enumeration, |
bool | is_desc | ||
) |
Definition at line 2901 of file object_domain.c.
References DB_TYPE_ENUMERATION, DOM_GET_ENUMERATION, tp_domain::is_desc, tp_domain::next_list, NULL, tp_domain_get_list(), and tp_enumeration_match().
Referenced by unpack_domain().
Definition at line 2572 of file object_domain.c.
References tp_domain::is_desc, tp_domain::next_list, NULL, and tp_domain_get_list().
Referenced by unpack_domain().
Definition at line 2601 of file object_domain.c.
References assert, DB_TYPE_NUMERIC, tp_domain::is_desc, tp_domain::next_list, NULL, tp_domain::precision, tp_domain::scale, and tp_domain_get_list().
Referenced by unpack_domain().
TP_DOMAIN* tp_domain_find_object | ( | DB_TYPE | type, |
OID * | class_oid, | ||
struct db_object * | class_mop, | ||
bool | is_desc | ||
) |
Definition at line 2728 of file object_domain.c.
References assert_release, tp_domain::class_mop, tp_domain::class_oid, tp_domain::is_desc, tp_domain::next_list, NULL, OID_EQ, tp_domain_get_list(), and WS_OID.
Referenced by unpack_domain().
Definition at line 2793 of file object_domain.c.
References d1, DB_TYPE_MIDXKEY, DB_TYPE_SEQUENCE, i, tp_domain::is_desc, tp_domain::is_visited, tp_domain::next, tp_domain::next_list, NULL, tp_domain::setdomain, tp_domain_get_list(), tp_domain_match(), tp_domain_size(), TP_EXACT_MATCH, and tp_setdomain_size().
Referenced by unpack_domain().
void tp_domain_free | ( | TP_DOMAIN * | dom | ) |
Definition at line 941 of file object_domain.c.
References area_free(), tp_domain::class_mop, db_json_delete_validator(), DB_TYPE_ENUMERATION, DB_TYPE_JSON, DOM_GET_ENUMERATION, pr_type::id, tp_domain::is_cached, tp_domain::json_validator, tp_domain::next, NULL, tp_domain::setdomain, tp_domain_clear_enumeration(), tp_domain_free(), and tp_domain::type.
Referenced by btree_prepare_bts(), build_attr_change_map(), catcls_get_or_value_from_indexes(), classobj_clear_attribute(), classobj_free_function_index_ref(), classobj_free_method_arg(), construct_index_key_domain(), db_type_from_string(), db_unpack_prepare_info(), db_width_bucket(), disk_to_domain2(), do_cast_host_variables_to_expected_domain(), do_create_midxkey_for_constraint(), heap_midxkey_key_get(), locator_add_or_remove_index_internal(), or_get_domain(), or_get_domain_internal(), or_unpack_query_format(), pt_check_enum_data_type(), scan_dbvals_to_midxkey(), sm_free_function_index_info(), smt_add_set_attribute_domain(), tp_domain_add(), tp_domain_cache(), tp_domain_copy(), tp_domain_drop(), tp_domain_filter_list(), tp_domain_free(), tp_domain_resolve_value(), tp_final(), unpack_domain(), and unpack_domain_2().
|
static |
Definition at line 1898 of file object_domain.c.
References tp_domain_get_list_ptr().
Referenced by tp_domain_find_charbit(), tp_domain_find_enumeration(), tp_domain_find_noparam(), tp_domain_find_numeric(), tp_domain_find_object(), and tp_domain_find_set().
|
static |
Definition at line 1875 of file object_domain.c.
References DB_TYPE_MIDXKEY, STATIC_INLINE, tp_domain_size(), and TP_NUM_MIDXKEY_DOMAIN_LIST.
Referenced by tp_domain_cache(), and tp_domain_get_list().
Definition at line 985 of file object_domain.c.
References assert, tp_domain::built_in_index, tp_domain::class_mop, tp_domain::class_oid, tp_domain::codeset, tp_domain::collation_flag, tp_domain::collation_id, db_enumeration::collation_id, DB_TYPE_ENUMERATION, DB_TYPE_LAST, DOM_SET_ENUM, tp_domain::enumeration, INTL_CODESET_RAW_BITS, tp_domain::is_cached, tp_domain::is_desc, tp_domain::is_parameterized, tp_domain::json_validator, LANG_SYS_CODESET, LANG_SYS_COLLATION, tp_domain::next, tp_domain::next_list, NULL, OID_SET_NULL, pr_type_from_id(), tp_domain::precision, tp_domain::scale, tp_domain::self_ref, tp_domain::setdomain, TP_DOMAIN_COLL_NORMAL, TP_IS_BIT_TYPE, TP_TYPE_HAS_COLLATION, and tp_domain::type.
Referenced by pt_get_src_domain(), pt_set_domain_class_list(), regu_init(), tp_domain_new(), and tp_domain_resolve_value().
Definition at line 1465 of file object_domain.c.
References tp_domain_match_internal().
Referenced by build_attr_change_map(), build_storage_order(), or_get_domain(), pr_midxkey_compare(), tp_domain_find_compatible(), tp_domain_find_set(), tp_domain_match_internal(), tp_domain_select(), and tp_is_domain_cached().
Definition at line 1478 of file object_domain.c.
References tp_domain_match_internal().
Referenced by scan_dbvals_to_midxkey().
|
static |
Definition at line 1492 of file object_domain.c.
References assert, tp_domain::class_mop, tp_domain::class_oid, tp_domain::codeset, tp_domain::collation_id, d1, db_json_are_validators_equal(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DB_VALUE, DB_TYPE_DOUBLE, DB_TYPE_ELO, DB_TYPE_ENUMERATION, DB_TYPE_ERROR, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MIDXKEY, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_RESULTSET, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SUB, DB_TYPE_TABLE, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, DOM_GET_ENUMERATION, i, tp_domain::is_desc, tp_domain::is_visited, tp_domain::json_validator, tp_domain::next, NULL, OID_EQ, OID_ISNULL, tp_domain::precision, tp_domain::scale, tp_domain::setdomain, STATIC_INLINE, tp_domain_match(), tp_domain_size(), TP_DOMAIN_TYPE, tp_enumeration_match(), TP_EXACT_MATCH, TP_FLOATING_PRECISION_VALUE, TP_NEAR_MATCH, TP_SET_MATCH, TP_STR_MATCH, TP_TYPE_HAS_COLLATION, tp_valid_indextype(), and WS_OID.
Referenced by tp_domain_match(), and tp_domain_match_ignore_order().
int tp_domain_memory_size | ( | TP_DOMAIN * | domain | ) |
Definition at line 11064 of file object_domain.c.
References DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, pr_type::get_id(), pr_type::get_mem_size_of_mem(), NULL, tp_domain::precision, TP_FLOATING_PRECISION_VALUE, and tp_domain::type.
Referenced by classobj_fixup_loaded_class(), and qexec_setup_topn_proc().
Definition at line 3947 of file object_domain.c.
References pr_type::name, and tp_domain::type.
Referenced by check_args(), db_width_bucket(), and do_set_trigger().
Definition at line 1043 of file object_domain.c.
References area_alloc(), NULL, and tp_domain_init().
Referenced by construct_index_key_domain(), db_width_bucket(), disk_to_domain2(), or_get_domain_internal(), pt_data_type_to_db_domain(), pt_node_data_type_to_db_domain(), tp_domain_construct(), tp_domain_copy(), tp_domain_resolve(), and tp_domain_resolve_value().
Definition at line 11399 of file object_domain.c.
References DB_TYPE_MULTISET, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_VOBJ, tp_domain::next, tp_domain::setdomain, tp_domain_references_objects(), and TP_DOMAIN_TYPE.
Referenced by heap_attrinfo_start_refoids(), and tp_domain_references_objects().
TP_DOMAIN* tp_domain_resolve | ( | DB_TYPE | domain_type, |
DB_OBJECT * | class_obj, | ||
int | precision, | ||
int | scale, | ||
TP_DOMAIN * | setdomain, | ||
int | collation | ||
) |
Definition at line 3053 of file object_domain.c.
References tp_domain::class_mop, tp_domain::codeset, lang_collation::codeset, tp_domain::collation_id, lang_get_collation(), NULL, tp_domain::precision, tp_domain::scale, tp_domain::setdomain, tp_domain_cache(), tp_domain_new(), and TP_TYPE_HAS_COLLATION.
Referenced by btree_generate_prefix_domain(), pt_assignment_compatible(), pt_bind_reserved_name(), pt_resolve_star_reserved_names(), pt_to_index_info(), and qexec_resolve_domains_for_aggregation().
Definition at line 3092 of file object_domain.c.
References assert_release, and NULL.
Referenced by catcls_get_or_value_from_attribute(), catcls_get_or_value_from_domain(), db_cp_query_type_helper(), db_hex(), db_round_dbval(), db_time_format(), db_to_number(), db_trunc_dbval(), db_type_to_db_domain(), db_width_bucket(), do_evaluate_default_expr(), eval_value_rel_cmp(), export_serial(), get_savepoint_name_from_db_value(), heap_midxkey_key_generate(), heap_object_upgrade_domain(), numeric_coerce_string_to_num(), numeric_common_prec_scale(), numeric_db_value_add(), numeric_db_value_div(), numeric_db_value_sub(), or_get_all_representation(), or_get_current_representation(), or_get_old_representation(), pt_assignment_compatible(), pt_check_alter_partition(), pt_coerce_node_collation(), pt_coerce_range_expr_arguments(), pt_create_iss_range(), pt_eval_expr_type(), pt_evaluate_db_value_expr(), pt_get_query_limit_from_limit(), pt_get_query_limit_from_orderby_for(), pt_instnum_to_key_limit(), pt_make_regu_constant(), pt_make_regu_pred(), pt_to_cume_dist_percent_rank_regu_variable(), pt_to_key_limit(), pt_to_upd_del_query(), qdata_add_bigint_to_timestamptz(), qdata_add_datetimetz_to_dbval(), qdata_add_dbval(), qdata_add_int_to_timestamptz(), qdata_add_short_to_timestamptz(), qdata_add_timestamptz_to_dbval(), qdata_aggregate_accumulator_to_accumulator(), qdata_divide_dbval(), qdata_evaluate_aggregate_list(), qdata_evaluate_analytic_func(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_multiply_dbval(), qdata_subtract_datetimetz_to_dbval(), qdata_subtract_dbval(), qdata_subtract_timestampltz_to_dbval(), qdata_update_agg_interpolation_func_value_and_domain(), qdata_update_interpolation_func_value_and_domain(), qexec_execute_insert(), qexec_fill_sort_limit(), qexec_init_instnum_val(), qexec_resolve_domains_for_aggregation(), qexec_resolve_domains_for_group_by(), qo_get_key_limit_from_instnum(), qo_get_key_limit_from_ordbynum(), qo_get_limit_from_eval_term(), scan_get_next_iss_value(), scan_init_index_key_limit(), session_set_cur_insert_id(), tf_compile_meta_classes(), tp_domain_resolve_default_w_coll(), tp_domain_resolve_value(), tp_set_compare(), tp_value_cast_internal(), tp_value_compare_with_error(), tp_value_str_auto_cast_to_number(), unpack_domain(), and unpack_domain_2().
TP_DOMAIN* tp_domain_resolve_default_w_coll | ( | DB_TYPE | type, |
int | coll_id, | ||
TP_DOMAIN_COLL_ACTION | coll_flag | ||
) |
Definition at line 3115 of file object_domain.c.
References assert, tp_domain::codeset, lang_collation::codeset, tp_domain::collation_flag, tp_domain::collation_id, lang_get_collation(), tp_domain_cache(), TP_DOMAIN_COLL_ENFORCE, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLL_NORMAL, tp_domain_copy(), tp_domain_resolve_default(), and TP_TYPE_HAS_COLLATION.
Referenced by pt_coerce_expression_argument(), and pt_coerce_node_collation().
Definition at line 3159 of file object_domain.c.
References assert, db_domain_info::char_info, tp_domain::codeset, tp_domain::collation_id, DB_DEFAULT_NUMERIC_PRECISION, DB_DEFAULT_NUMERIC_SCALE, db_get_json_schema, db_get_midxkey(), db_get_object(), db_get_set(), db_get_string_codeset(), db_get_string_collation(), db_json_load_validator(), DB_MAX_VARBIT_PRECISION, DB_MAX_VARCHAR_PRECISION, DB_MAX_VARNCHAR_PRECISION, DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DB_VALUE, DB_TYPE_DOUBLE, DB_TYPE_ELO, DB_TYPE_ENUMERATION, DB_TYPE_ERROR, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MIDXKEY, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_RESULTSET, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SUB, DB_TYPE_TABLE, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, DB_VALUE_DOMAIN_TYPE, db_value_precision(), db_value_scale(), DB_VALUE_TYPE, db_midxkey::domain, db_value::domain, DOMAIN_COMPATIBLE, tp_domain::is_cached, tp_domain::json_validator, db_domain_info::char_info::length, NO_ERROR, NULL, tp_domain::precision, tp_domain::scale, set_get_domain(), tp_domain::setdomain, setobj_build_domain_from_col(), tp_domain_cache(), tp_domain_check(), tp_domain_free(), tp_domain_init(), tp_domain_new(), tp_domain_resolve_default(), TP_DOMAIN_TYPE, TP_EXACT_MATCH, TP_FLOATING_PRECISION_VALUE, TP_IS_SET_TYPE, tp_Object_domain, tp_Vobj_domain, WS_IS_DELETED, and WS_ISVID.
Referenced by btree_range_opt_check_add_index_key(), do_evaluate_default_expr(), fetch_peek_arith(), fetch_peek_dbval(), ldr_bstr_elem(), ldr_xstr_elem(), or_pack_mem_value(), or_packed_value_size(), or_put_value(), pt_evaluate_db_value_expr(), pt_to_regu_variable(), qdata_evaluate_analytic_func(), qdata_strcat_dbval(), qexec_execute_insert(), qexec_resolve_domains_for_aggregation(), scan_dbvals_to_midxkey(), setobj_build_domain_from_col(), cubload::to_db_varbit_from_bin_str(), cubload::to_db_varbit_from_hex_str(), tp_domain_select(), tp_value_cast_internal(), and tp_value_change_coll_and_codeset().
TP_DOMAIN* tp_domain_select | ( | const TP_DOMAIN * | domain_list, |
const DB_VALUE * | value, | ||
int | allow_coercion, | ||
TP_MATCH | exact_match | ||
) |
Definition at line 4100 of file object_domain.c.
References ARG_FILE_LINE, assert, obj_template::classobj, db_get_enum_collation(), DB_GET_ENUM_ELEM_STRING, DB_GET_ENUM_ELEM_STRING_SIZE, db_get_enum_short(), db_get_enum_string(), db_get_enum_string_size(), db_get_object(), db_get_oid(), db_get_pointer(), db_get_set(), db_make_null(), db_make_object(), db_on_server, DB_TYPE_CHAR, DB_TYPE_ENUMERATION, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_VALUE_TYPE, DOM_GET_ENUM_ELEM, DOM_GET_ENUM_ELEMS_COUNT, DOMAIN_COMPATIBLE, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), i, NULL, OID_ISNULL, prm_get_bool_value(), PRM_ID_IGNORE_TRAILING_SPACE, QSTR_COMPARE, set_check_domain(), sm_check_class_domain(), sm_check_object_domain(), tp_domain_match(), tp_domain_resolve_value(), TP_DOMAIN_TYPE, TP_IS_SET_TYPE, tp_domain::type, and ws_mop().
Referenced by check_args(), obj_find_object_by_cons_and_key(), pt_fix_enumeration_comparison(), tp_domain_check(), and tp_value_cast_internal().
TP_DOMAIN* tp_domain_select_type | ( | const TP_DOMAIN * | domain_list, |
DB_TYPE | type, | ||
DB_OBJECT * | class_mop, | ||
int | allow_coercion | ||
) |
Definition at line 4413 of file object_domain.c.
References DB_TYPE_NULL, DB_TYPE_OBJECT, DB_TYPE_VARIABLE, i, tp_domain::next, NULL, sm_check_class_domain(), TP_DOMAIN_TYPE, TP_IS_SET_TYPE, and tp_domain::type.
Referenced by check_object_domain().
Definition at line 1382 of file object_domain.c.
References tp_domain_size_internal().
Referenced by catalog_fetch_btree_statistics(), catalog_get_cardinality(), or_put_domain(), orc_diskrep_from_record(), stats_client_unpack_statistics(), tp_domain_construct(), tp_domain_find_set(), tp_domain_get_list_ptr(), tp_domain_match_internal(), tp_is_domain_cached(), tp_setdomain_size(), unpack_domain(), unpack_domain_2(), and xstats_get_statistics_from_server().
Definition at line 1363 of file object_domain.c.
References tp_domain::next.
Referenced by tp_domain_size(), and tp_setdomain_size().
int tp_domain_status_er_set | ( | TP_DOMAIN_STATUS | status, |
const char * | file_name, | ||
const int | line_no, | ||
const DB_VALUE * | src, | ||
const TP_DOMAIN * | domain | ||
) |
Definition at line 11628 of file object_domain.c.
References assert, DB_VALUE_DOMAIN_TYPE, DOMAIN_ERROR, DOMAIN_INCOMPATIBLE, DOMAIN_OVERFLOW, er_errid(), ER_ERROR_SEVERITY, ER_IT_DATA_OVERFLOW, ER_JSON_INVALID_JSON, er_set(), ER_TP_CANT_COERCE, error(), NO_ERROR, NULL, pr_type_name(), and TP_DOMAIN_TYPE.
Referenced by check_att_domain(), db_value_coerce(), do_evaluate_default_expr(), do_set_trigger(), fetch_peek_arith(), heap_attrinfo_set(), heap_object_upgrade_domain(), pt_check_json_table_node(), pt_evaluate_db_value_expr(), pt_to_update_xasl(), qdata_add_dbval(), qdata_cast_to_domain(), qdata_coerce_result_to_domain(), qdata_concatenate_dbval(), qdata_divide_dbval(), qdata_evaluate_analytic_func(), qdata_get_dbval_from_constant_regu_variable(), qdata_multiply_dbval(), qdata_strcat_dbval(), qdata_subtract_dbval(), qexec_analytic_evaluate_offset_function(), qexec_execute_insert(), qexec_fill_sort_limit(), qexec_init_instnum_val(), scan_init_index_key_limit(), and tp_value_str_auto_cast_to_number().
Definition at line 5509 of file object_domain.c.
References _dtoa, ARG_FILE_LINE, assert, db_get_double(), db_get_string_codeset(), db_get_string_collation(), db_make_char(), db_make_nchar(), db_make_null(), db_make_varchar(), db_make_varnchar(), db_private_alloc, db_private_free_and_init, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_TYPE, ER_ERROR_SEVERITY, er_set(), ER_TP_CANT_COERCE, format_floating_point(), db_value::need_clear, NULL, pr_type_name(), strlen, TP_DOUBLE_AS_CHAR_LENGTH, and TP_DOUBLE_MANTISA_DECIMAL_PRECISION.
Referenced by tp_value_cast_internal().
|
static |
Definition at line 820 of file object_domain.c.
References db_enumeration::collation_id, db_enumeration::count, DB_GET_ENUM_ELEM_STRING, DB_GET_ENUM_ELEM_STRING_SIZE, db_enumeration::elements, i, and NULL.
Referenced by tp_domain_find_enumeration(), tp_domain_match_internal(), and tp_is_domain_cached().
Definition at line 5577 of file object_domain.c.
References assert, DB_DEFAULT_PRECISION, db_get_enum_codeset(), db_get_enum_collation(), db_get_enum_string(), db_get_enum_string_size(), db_make_varchar(), ER_FAILED, error(), NO_ERROR, and NULL.
Referenced by db_value_printer::describe_value(), and tp_value_cast_internal().
void tp_final | ( | void | ) |
Definition at line 708 of file object_domain.c.
References area_destroy(), assert, tp_domain::built_in_index, i, tp_domain::is_cached, tp_domain::next_list, NULL, tp_domain_free(), and tp_Initialized.
Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), boot_server_all_finalize(), and patchdb().
Definition at line 5438 of file object_domain.c.
References _dtoa, ARG_FILE_LINE, assert, db_get_float(), db_get_string_codeset(), db_get_string_collation(), db_make_char(), db_make_nchar(), db_make_null(), db_make_varchar(), db_make_varnchar(), db_private_alloc, db_private_free_and_init, DB_TYPE_CHAR, DB_TYPE_FLOAT, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_TYPE, ER_ERROR_SEVERITY, er_set(), ER_TP_CANT_COERCE, format_floating_point(), db_value::need_clear, NULL, pr_type_name(), strlen, TP_FLOAT_AS_CHAR_LENGTH, and TP_FLOAT_MANTISA_DECIMAL_PRECISION.
Referenced by tp_value_cast_internal().
int tp_get_fixed_precision | ( | DB_TYPE | domain_type | ) |
Definition at line 877 of file object_domain.c.
References DB_BIGINT_PRECISION, DB_DATE_PRECISION, DB_DATETIME_PRECISION, DB_DATETIMETZ_PRECISION, DB_DEFAULT_PRECISION, DB_DOUBLE_DECIMAL_PRECISION, DB_FLOAT_DECIMAL_PRECISION, DB_INTEGER_PRECISION, DB_MONETARY_DECIMAL_PRECISION, DB_SHORT_PRECISION, DB_TIME_PRECISION, DB_TIMESTAMP_PRECISION, DB_TIMESTAMPTZ_PRECISION, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, and DB_TYPE_TIMESTAMPTZ.
Referenced by tp_domain_construct(), unpack_domain(), and unpack_domain_2().
|
static |
Definition at line 11849 of file object_domain.c.
References assert, char_isdigit(), char_isxdigit(), DATA_STATUS_OK, ER_FAILED, error(), HIGHEST_4BITS_OF_UBI, intl_skip_spaces(), NO_ERROR, NULL, p, and tp_ubi_to_bi_with_args().
Referenced by tp_atobi().
Definition at line 11534 of file object_domain.c.
References assert, DB_MAX_NUMERIC_PRECISION, DB_TYPE_NULL, DB_TYPE_NUMERIC, db_type_to_db_domain(), DB_TYPE_VARCHAR, pr_type::id, tp_domain::precision, tp_domain::scale, tp_domain_cache(), tp_domain_copy(), TP_FLOATING_PRECISION_VALUE, TP_IS_BIT_TYPE, TP_IS_CHAR_TYPE, TP_IS_DATE_TYPE, TP_IS_NUMERIC_TYPE, TP_IS_SET_TYPE, tp_more_general_type(), and tp_domain::type.
Referenced by fetch_peek_arith(), and pt_evaluate_db_value_expr().
int tp_init | ( | void | ) |
Definition at line 611 of file object_domain.c.
References area_create(), assert, tp_domain::built_in_index, tp_domain::class_mop, tp_domain::class_oid, DOM_SET_ENUM, er_errid(), i, tp_domain::is_cached, tp_domain::is_desc, tp_domain::next_list, NO_ERROR, NULL, db_identifier::pageid, tp_domain::self_ref, tp_domain::setdomain, db_identifier::slotid, tp_Initialized, and db_identifier::volid.
Referenced by boot_initialize_client(), boot_restart_client(), boot_restart_server(), patchdb(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_restart_from_backup().
Definition at line 11091 of file object_domain.c.
References DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, DB_TYPE_NULL, db_value_domain_init(), pr_type::initval(), NULL, tp_domain::precision, tp_domain::scale, and tp_domain::type.
Referenced by or_get_value(), and or_unpack_mem_value().
|
static |
Definition at line 1918 of file object_domain.c.
References assert, tp_domain::class_mop, db_object::class_mop, tp_domain::class_oid, tp_domain::codeset, tp_domain::collation_flag, tp_domain::collation_id, d1, db_json_are_validators_equal(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DB_VALUE, DB_TYPE_DOUBLE, DB_TYPE_ELO, DB_TYPE_ENUMERATION, DB_TYPE_ERROR, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MIDXKEY, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_RESULTSET, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SUB, DB_TYPE_TABLE, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, DOM_GET_ENUMERATION, i, tp_domain::is_desc, tp_domain::is_visited, tp_domain::json_validator, tp_domain::next, tp_domain::next_list, NULL, OID_EQ, OID_ISNULL, tp_domain::precision, tp_domain::scale, tp_domain::setdomain, tp_domain_match(), tp_domain_size(), TP_DOMAIN_TYPE, tp_enumeration_match(), TP_EXACT_MATCH, TP_FLOATING_PRECISION_VALUE, TP_NEAR_MATCH, TP_SET_MATCH, tp_setdomain_size(), TP_STR_MATCH, and WS_OID.
Referenced by tp_domain_cache().
|
static |
Definition at line 5209 of file object_domain.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, and NULL.
Referenced by tp_value_cast_internal().
Definition at line 10348 of file object_domain.c.
References DB_TYPE_LAST, db_type_rank, and i.
Referenced by btree_coerce_key(), eval_value_rel_cmp(), pt_eval_expr_type(), tp_infer_common_domain(), tp_set_compare(), and tp_value_compare_with_error().
|
static |
Definition at line 11974 of file object_domain.c.
References assert, char_isdigit(), DATA_STATUS_OK, ER_FAILED, error(), NO_ERROR, NULL, p, tp_ubi_times_ten(), and tp_ubi_to_bi_with_args().
Referenced by tp_atobi().
DB_VALUE_COMPARE_RESULT tp_set_compare | ( | const DB_VALUE * | value1, |
const DB_VALUE * | value2, | ||
int | do_coercion, | ||
int | total_order | ||
) |
Definition at line 10401 of file object_domain.c.
References DB_EQ, db_get_set(), DB_GT, DB_IS_NULL, DB_LT, db_make_null(), DB_NE, DB_TYPE_MULTISET, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_UNK, DB_VALUE_DOMAIN_TYPE, DB_VALUE_TYPE, DOMAIN_COMPATIBLE, pr_clear_value(), set_compare(), tp_domain_resolve_default(), tp_more_general_type(), and tp_value_coerce().
Referenced by db_set_compare(), and eval_value_rel_cmp().
Definition at line 1393 of file object_domain.c.
References assert, DB_TYPE_MIDXKEY, NULL, tp_domain::precision, tp_domain::setdomain, tp_domain_size(), tp_domain_size_internal(), and TP_DOMAIN_TYPE.
Referenced by tp_domain_find_set(), and tp_is_domain_cached().
|
static |
Definition at line 2542 of file object_domain.c.
References tp_domain::class_mop, tp_domain::class_oid, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_VOBJ, tp_domain::next, NULL, OID_ISNULL, tp_domain::setdomain, TP_DOMAIN_TYPE, TP_IS_SET_TYPE, and ws_mop().
Referenced by tp_domain_cache().
|
static |
Definition at line 12301 of file object_domain.c.
References assert, HIGHEST_3BITS_OF_UBI, and NULL.
Referenced by tp_scientific_str_to_bi().
|
static |
Definition at line 12209 of file object_domain.c.
References assert, DATA_STATUS_TRUNCATED, DB_BIGINT_MAX, DB_BIGINT_MIN, HIGHEST_BIT_OF_UINT64, and NULL.
Referenced by tp_hex_str_to_bi(), and tp_scientific_str_to_bi().
int tp_valid_indextype | ( | DB_TYPE | type | ) |
Definition at line 11357 of file object_domain.c.
References DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, and DB_TYPE_VARNCHAR.
Referenced by allocate_index(), btree_compare_key(), btree_find_min_or_max_key(), btree_get_stats(), check_change_attribute(), key_type_to_string(), mr_data_cmpdisk_resultset(), mr_data_cmpdisk_sequence(), mr_data_cmpdisk_set(), mr_data_cmpdisk_vobj(), patchdb(), qo_rewrite_subqueries(), sm_load_online_index(), smt_add_constraint(), and tp_domain_match_internal().
TP_DOMAIN_STATUS tp_value_auto_cast | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain | ||
) |
Definition at line 11458 of file object_domain.c.
References db_make_null(), DOMAIN_COMPATIBLE, er_clear(), pr_clear_value(), prm_get_bool_value(), PRM_ID_RETURN_NULL_ON_FUNCTION_ERRORS, and tp_value_cast().
Referenced by db_hex(), db_time_format(), fetch_peek_arith(), heap_attrinfo_set(), pt_to_update_xasl(), qdata_add_dbval(), qdata_divide_dbval(), qdata_get_dbval_from_constant_regu_variable(), qdata_multiply_dbval(), qdata_strcat_dbval(), qdata_subtract_dbval(), and tp_value_str_auto_cast_to_number().
TP_DOMAIN_STATUS tp_value_cast | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain, | ||
bool | implicit_coercion | ||
) |
Definition at line 10199 of file object_domain.c.
References mode, TP_EXPLICIT_COERCION, TP_IMPLICIT_COERCION, and tp_value_cast_internal().
Referenced by assign_set_value(), btree_store_overflow_key(), check_args(), check_att_domain(), db_bit_count_dbval(), db_date_format(), db_time_format(), db_unix_timestamp(), db_value_alloc_and_copy(), db_value_to_enumeration_value(), db_value_to_json_key(), db_value_to_json_value(), do_evaluate_default_expr(), cubxasl::json_table::column::evaluate_exists(), cubxasl::json_table::column::evaluate_extract(), fetch_peek_arith(), get_savepoint_name_from_db_value(), heap_object_upgrade_domain(), ldr_act_class_attr(), ldr_bstr_elem(), ldr_xstr_elem(), partition_prune_hash(), pt_check_json_table_node(), pt_coerce_value_internal(), pt_evaluate_db_value_expr(), pt_make_regu_hostvar(), pt_to_odku_info(), pt_value_to_db(), qdata_cast_to_domain(), qdata_concatenate_dbval(), qdata_evaluate_aggregate_list(), qdata_evaluate_analytic_func(), qdata_update_interpolation_func_value_and_domain(), qexec_execute_insert(), qexec_resolve_domains_for_aggregation(), qexec_schema_get_type_desc(), qexec_setup_topn_proc(), qfile_compare_with_interpolation_domain(), session_set_cur_insert_id(), smt_change_class_shared_attribute_domain(), smt_set_attribute_default(), cubload::to_db_varbit_from_bin_str(), cubload::to_db_varbit_from_hex_str(), tp_value_auto_cast(), tp_value_change_coll_and_codeset(), and tp_value_coerce().
TP_DOMAIN_STATUS tp_value_cast_force | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain, | ||
bool | implicit_coercion | ||
) |
Definition at line 10208 of file object_domain.c.
References mode, TP_FORCE_COERCION, and tp_value_cast_internal().
Referenced by db_value_coerce(), fetch_peek_arith(), and qo_reduce_equality_terms().
|
static |
Definition at line 7073 of file object_domain.c.
References db_monetary::amount, assert, ASSERT_ERROR, bfmt_print(), tp_domain::class_mop, tp_domain::codeset, tp_domain::collation_flag, tp_domain::collation_id, db_value::data, DATA_STATUS_NOT_CONSUMED, DATA_STATUS_OK, DATA_STATUS_TRUNCATED, db_datetime::date, db_datetimetz::datetime, DATETIMETZ_BUF_SIZE, DB_BIGINT_MAX, DB_BIGINT_MIN, db_bit_string_coerce(), db_bit_to_blob(), db_blob_to_bit(), db_char_string_coerce(), db_char_to_blob(), db_char_to_clob(), db_clob_to_char(), DB_CURRENCY_DEFAULT, db_date_decode(), db_date_to_string(), db_datetime_decode(), db_datetime_to_string(), db_datetimetz_to_string(), db_get_bigint(), db_get_class(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_enum_codeset(), db_get_enum_collation(), DB_GET_ENUM_ELEM_STRING, DB_GET_ENUM_ELEM_STRING_SIZE, db_get_enum_short(), db_get_enum_string(), db_get_enum_string_size(), db_get_float(), db_get_int(), db_get_json_document(), db_get_monetary(), db_get_object(), db_get_pointer(), db_get_set(), db_get_short(), db_get_string(), db_get_string_codeset(), db_get_string_collation(), db_get_string_length(), db_get_string_size(), db_get_time(), db_get_timestamp(), db_get_timestamptz(), DB_INT32_MAX, DB_INT32_MIN, DB_IS_NULL, db_is_subclass(), db_is_vclass(), db_json_allocate_doc(), db_json_copy_and_convert_to_utf8(), db_json_delete_doc(), db_json_get_bigint_from_document(), db_json_get_bool_as_str_from_document(), db_json_get_bool_from_document(), db_json_get_double_from_document(), db_json_get_int_from_document(), db_json_get_json_from_str(), db_json_get_raw_json_body_from_document(), db_json_get_string_from_document(), db_json_get_type(), db_json_set_bigint_to_doc(), db_json_set_double_to_doc(), db_json_set_int_to_doc(), db_json_validate_doc(), db_make_bigint(), db_make_bit(), db_make_date(), db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_double(), db_make_enumeration(), db_make_float(), db_make_int(), db_make_json(), db_make_monetary(), db_make_multiset(), db_make_null(), db_make_object(), db_make_oid(), db_make_pointer(), db_make_sequence(), db_make_set(), db_make_short(), db_make_string(), db_make_string_copy(), db_make_time(), db_make_timestamp(), db_make_timestampltz(), db_make_timestamptz(), db_make_varchar(), DB_MAX_STRING_LENGTH, db_private_alloc, db_private_free_and_init, db_real_instance(), db_seq_create(), db_seq_put(), db_string_put_cs_and_collation(), db_time_decode(), db_time_encode(), db_time_to_string(), db_timestamp_decode_ses(), db_timestamp_decode_utc(), db_timestamp_decode_w_tz_id(), db_timestamp_encode_ses(), db_timestamp_encode_utc(), db_timestamp_to_string(), db_timestamptz_to_string(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_SMALLINT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, db_type_to_db_domain(), DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, db_value_alter_type(), db_value_clone(), db_value_coerce(), db_value_domain_init(), DB_VALUE_PRECISION, db_value_precision(), db_value_put_encoded_time(), db_value_put_null(), DB_VALUE_SCALE, DB_VALUE_TYPE, DBL_MAX_DIGITS, db_json::document, DOM_GET_ENUM_ELEM, DOM_GET_ENUM_ELEMS_COUNT, db_value::domain, DOMAIN_COMPATIBLE, DOMAIN_ERROR, DOMAIN_INCOMPATIBLE, DOMAIN_OVERFLOW, er_errid(), ER_IT_DATA_OVERFLOW, ER_OUT_OF_VIRTUAL_MEMORY, err, db_domain_info::general_info, i, pr_type::id, INTL_CODESET_RAW_BYTES, db_domain_info::general_info::is_null, tp_domain::is_parameterized, db_data::json, tp_domain::json_validator, lang_currency_symbol(), make_desired_string_db_value(), db_value::need_clear, tp_domain::next, NO_ERROR, NULL, numeric_db_value_coerce_from_num(), numeric_db_value_coerce_to_num(), numeric_db_value_print(), NUMERIC_MAX_STRING_SIZE, OID_SET_NULL, OR_CHECK_ASSIGN_OVERFLOW, OR_CHECK_BIGINT_OVERFLOW, OR_CHECK_FLOAT_OVERFLOW, OR_CHECK_INT_OVERFLOW, OR_CHECK_SHORT_OVERFLOW, OR_CHECK_USHRT_OVERFLOW, p, pr_clear_value(), pr_clone_value(), tp_domain::precision, prm_get_bool_value(), PRM_ID_ALLOW_TRUNCATED_STRING, PRM_ID_IGNORE_TRAILING_SPACE, QSTR_COMPARE, qstr_hex_to_bin(), ROUND, tp_domain::scale, SECONDS_IN_A_DAY, db_set::set, set_coerce(), set_copy(), tp_domain::setdomain, setobj_domain(), setobj_put_domain(), sm_check_class_domain(), sm_coerce_object_domain(), strlen, db_datetime::time, db_timestamptz::timestamp, TP_ANY_MATCH, tp_atobi(), tp_atodate(), tp_atodatetimetz(), tp_atof(), tp_atonumeric(), tp_atotime(), tp_atotimestamptz(), tp_atoudatetime(), tp_atoutime(), TP_BIGINT_PRECISION, tp_can_steal_string(), tp_domain_add(), TP_DOMAIN_CODESET, TP_DOMAIN_COLL_ENFORCE, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION, tp_domain_compatible(), tp_domain_copy(), tp_domain_resolve_default(), tp_domain_resolve_value(), tp_domain_select(), TP_DOMAIN_TYPE, tp_dtoa(), tp_enumeration_to_varchar(), TP_FLOATING_PRECISION_VALUE, TP_FORCE_COERCION, tp_ftoa(), TP_IMPLICIT_COERCION, TP_IMPLICIT_COERCION_NOT_ALLOWED, TP_IS_CHAR_TYPE, TP_IS_SET_TYPE, tp_ltoa(), tp_value_coerce(), tp_value_slam_domain(), tp_domain::type, tz_create_datetimetz_from_ses(), tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_timestamp(), tz_datetimeltz_to_local(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_utc_datetimetz_to_local(), vid_object_to_vobj(), vid_oid_to_object(), and vid_vobj_to_object().
Referenced by tp_value_cast(), tp_value_cast_force(), tp_value_cast_no_domain_select(), and tp_value_cast_preserve_domain().
TP_DOMAIN_STATUS tp_value_cast_no_domain_select | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain, | ||
bool | implicit_coercion | ||
) |
Definition at line 10248 of file object_domain.c.
References mode, TP_EXPLICIT_COERCION, TP_IMPLICIT_COERCION, and tp_value_cast_internal().
TP_DOMAIN_STATUS tp_value_cast_preserve_domain | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain, | ||
bool | implicit_coercion, | ||
bool | preserve_domain | ||
) |
Definition at line 10228 of file object_domain.c.
References mode, TP_EXPLICIT_COERCION, TP_IMPLICIT_COERCION, and tp_value_cast_internal().
Referenced by do_cast_host_variables_to_expected_domain(), pt_set_host_variables(), and pt_value_to_db().
TP_DOMAIN_STATUS tp_value_change_coll_and_codeset | ( | DB_VALUE * | src, |
DB_VALUE * | dest, | ||
int | coll_id, | ||
int | codeset | ||
) |
Definition at line 10267 of file object_domain.c.
References assert, tp_domain::codeset, tp_domain::collation_id, db_get_string_codeset(), db_get_string_collation(), DB_VALUE_TYPE, DOMAIN_COMPATIBLE, DOMAIN_ERROR, tp_domain::is_cached, NULL, tp_domain_cache(), tp_domain_copy(), tp_domain_resolve_value(), TP_IS_STRING_TYPE, and tp_value_cast().
Referenced by fetch_peek_arith().
TP_DOMAIN_STATUS tp_value_coerce | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain | ||
) |
Definition at line 5793 of file object_domain.c.
References tp_value_cast().
Referenced by btree_coerce_key(), check_args(), db_gadget_bind(), db_round_dbval(), db_trunc_dbval(), db_width_bucket(), do_set_trigger(), eval_value_rel_cmp(), get_priority(), pt_evaluate_db_value_expr(), pt_get_query_limit_from_limit(), pt_get_query_limit_from_orderby_for(), pt_to_merge_update_xasl(), pt_value_to_db(), qdata_add_sequence_to_dbval(), qdata_aggregate_value_to_accumulator(), qdata_coerce_result_to_domain(), qdata_copy_hscan_key(), qdata_copy_hscan_key_without_alloc(), qdata_evaluate_analytic_func(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qexec_analytic_evaluate_offset_function(), qexec_fill_sort_limit(), qexec_init_instnum_val(), scan_init_index_key_limit(), setobj_ismember(), tp_set_compare(), tp_value_cast_internal(), and tp_value_compare_with_error().
int tp_value_coerce_strict | ( | const DB_VALUE * | src, |
DB_VALUE * | dest, | ||
const TP_DOMAIN * | desired_domain | ||
) |
Definition at line 5807 of file object_domain.c.
References db_monetary::amount, DATA_STATUS_NOT_CONSUMED, DATA_STATUS_OK, DATA_STATUS_TRUNCATED, db_datetime::date, db_datetimetz::datetime, DB_CURRENCY_DEFAULT, DB_DATETIMETZ_INITIALIZER, db_get_bigint(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), db_get_timestamp(), db_get_timestamptz(), db_make_bigint(), db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_null(), db_make_short(), db_make_timestamp(), db_make_timestampltz(), db_make_timestamptz(), db_time_encode(), db_timestamp_decode_ses(), db_timestamp_decode_utc(), db_timestamp_decode_w_tz_id(), db_timestamp_encode_ses(), db_timestamp_encode_utc(), DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_domain_init(), db_value_put_encoded_date(), db_value_put_encoded_time(), DB_VALUE_TYPE, er_clear(), ER_FAILED, err, i, NO_ERROR, NULL, numeric_db_value_coerce_from_num_strict(), numeric_db_value_coerce_to_num(), OR_CHECK_BIGINT_OVERFLOW, OR_CHECK_FLOAT_OVERFLOW, OR_CHECK_INT_OVERFLOW, OR_CHECK_SHORT_OVERFLOW, pr_clone_value(), tp_domain::precision, tp_domain::scale, db_datetime::time, db_timestamptz::timestamp, tp_atodate(), tp_atodatetimetz(), tp_atof(), tp_atonumeric(), tp_atotime(), tp_atotimestamptz(), tp_atoudatetime(), tp_atoutime(), TP_DOMAIN_TYPE, TP_IS_DATETIME_TYPE, TP_IS_NUMERIC_TYPE, tz_create_datetimetz_from_ses(), tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_timestamp(), tz_get_utc_tz_id(), db_timestamptz::tz_id, db_datetimetz::tz_id, and tz_utc_datetimetz_to_local().
Referenced by btree_coerce_key(), and scan_dbvals_to_midxkey().
DB_VALUE_COMPARE_RESULT tp_value_compare | ( | const DB_VALUE * | value1, |
const DB_VALUE * | value2, | ||
int | allow_coercion, | ||
int | total_order | ||
) |
Definition at line 10533 of file object_domain.c.
References NULL, and tp_value_compare_with_error().
Referenced by btree_get_stats_midxkey(), btree_get_unique_statistics(), catcls_apply_resolutions(), catcls_update_instance(), col_bsearch(), col_find(), col_value_compare(), db_value_compare(), do_create_auto_increment_serial(), do_update_maxvalue_of_auto_increment_serial(), eliminate_duplicated_keys(), mht_compare_dbvalues_are_equal(), mr_cmpval_object(), partition_do_regu_variables_match(), partition_prune_range(), pt_evaluate_db_value_expr(), qdata_agg_hkey_compare(), qdata_evaluate_aggregate_hierarchy(), qdata_hscan_key_compare(), qexec_check_limit_clause(), qexec_cmp_tpl_vals_merge(), qexec_get_orderbynum_upper_bound(), qexec_groupby_index(), qexec_topn_cmpval(), qo_compare_dbvalue_with_optype(), scan_key_compare(), setobj_compare(), setobj_compare_order(), setobj_difference(), setobj_intersection(), setobj_issome(), setobj_union(), setvobj_compare(), and tp_value_equal().
DB_VALUE_COMPARE_RESULT tp_value_compare_with_error | ( | const DB_VALUE * | value1, |
const DB_VALUE * | value2, | ||
int | do_coercion, | ||
int | total_order, | ||
bool * | can_compare | ||
) |
Definition at line 10561 of file object_domain.c.
References ARE_COMPARABLE, ARG_FILE_LINE, assert, assert_release, pr_type::cmpval(), tp_domain::codeset, lang_collation::codeset, tp_domain::collation_id, d1, DATA_STATUS_OK, db_char_string_coerce(), DB_EQ, db_get_enum_codeset(), db_get_enum_collation(), db_get_object(), db_get_oid(), db_get_string_codeset(), db_get_string_collation(), DB_GT, DB_IS_NULL, DB_LT, db_make_null(), db_string_put_cs_and_collation(), DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_MIDXKEY, DB_TYPE_OBJECT, DB_TYPE_OID, DB_UNK, db_value_domain_init(), DB_VALUE_DOMAIN_TYPE, DB_VALUE_PRECISION, DB_VALUE_TYPE, DOMAIN_COMPATIBLE, er_clear(), ER_ERROR_SEVERITY, ER_MR_NULL_DOMAIN, ER_QSTR_INCOMPATIBLE_COLLATIONS, er_set(), ER_TP_CANT_COERCE, pr_type::id, lang_get_collation(), LANG_RT_COMMON_COLL, NO_ERROR, NULL, oidcmp(), pr_clear_value(), pr_type_from_id(), pr_type_name(), tp_domain_cache(), tp_domain_copy(), tp_domain_resolve_default(), TP_IS_CHAR_TYPE, TP_IS_DATE_OR_TIME_TYPE, TP_IS_NUMERIC_TYPE, tp_more_general_type(), TP_TYPE_HAS_COLLATION, tp_value_coerce(), and WS_OID.
Referenced by btree_compare_key(), db_least_or_greatest(), eval_value_rel_cmp(), fetch_peek_arith(), mr_cmpval_json(), pr_midxkey_compare_element(), and tp_value_compare().
Definition at line 3967 of file object_domain.c.
References DB_VALUE_TYPE, and pr_type_name().
Referenced by check_args(), and do_set_trigger().
Definition at line 11015 of file object_domain.c.
References DB_EQ, and tp_value_compare().
Referenced by db_value_equal(), setobj_find_seq_element(), vid_compare_non_updatable_objects(), and ws_vmop().
Definition at line 1420 of file object_domain.c.
References db_domain_info::char_info, tp_domain::collation_flag, db_string_put_cs_and_collation(), DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value::domain, db_domain_info::general_info, db_domain_info::char_info::length, db_domain_info::numeric_info, tp_domain::precision, db_domain_info::numeric_info::precision, tp_domain::scale, db_domain_info::numeric_info::scale, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_ENFORCE, TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION, TP_DOMAIN_TYPE, db_domain_info::general_info::type, db_domain_info::numeric_info::type, and db_domain_info::char_info::type.
Referenced by tp_value_cast_internal().
Definition at line 11489 of file object_domain.c.
References ARG_FILE_LINE, assert, db_make_null(), DB_TYPE_DOUBLE, DB_VALUE_DOMAIN_TYPE, DOMAIN_COMPATIBLE, ER_FAILED, NO_ERROR, NULL, pr_clear_value(), tp_domain_resolve_default(), tp_domain_status_er_set(), TP_IS_CHAR_TYPE, and tp_value_auto_cast().
Referenced by db_abs_dbval(), db_ceil_dbval(), db_floor_dbval(), db_mod_bigint(), db_mod_double(), db_mod_float(), db_mod_int(), db_mod_monetary(), db_mod_numeric(), db_mod_short(), db_mod_string(), db_round_dbval(), and qdata_unary_minus_dbval().
Definition at line 5715 of file object_domain.c.
References db_make_double(), DB_VALUE_TYPE, ER_FAILED, NO_ERROR, tp_atof(), and TP_IS_CHAR_STRING.
Referenced by db_round_dbvalue_to_int().
unsigned int db_on_server |
Definition at line 91 of file network_interface_cl.c.
Referenced by tp_domain_check_class(), and tp_domain_select().
Definition at line 108 of file object_domain.c.
Referenced by tp_more_general_type().
|
static |
Definition at line 410 of file object_domain.c.
TP_DOMAIN tp_Bigint_domain = { NULL, NULL, &tp_Bigint, DOMAIN_INIT4 (DB_BIGINT_PRECISION, 0) } |
Definition at line 236 of file object_domain.c.
|
static |
Definition at line 480 of file object_domain.c.
TP_DOMAIN tp_Bit_domain |
Definition at line 302 of file object_domain.c.
Referenced by pt_add_pseudocolumns_placeholders(), qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qexec_check_for_cycle(), qexec_execute_connect_by(), and qexec_recalc_tuples_parent_pos_in_list().
TP_DOMAIN tp_Blob_domain = { NULL, NULL, &tp_Blob, DOMAIN_INIT } |
Definition at line 266 of file object_domain.c.
|
static |
Definition at line 459 of file object_domain.c.
TP_DOMAIN tp_Char_domain |
Definition at line 310 of file object_domain.c.
TP_DOMAIN tp_Clob_domain = { NULL, NULL, &tp_Clob, DOMAIN_INIT } |
Definition at line 267 of file object_domain.c.
TP_DOMAIN tp_Date_domain = { NULL, NULL, &tp_Date, DOMAIN_INIT4 (DB_DATE_PRECISION, 0) } |
Definition at line 272 of file object_domain.c.
Referenced by round_date().
TP_DOMAIN tp_Datetime_domain |
Definition at line 274 of file object_domain.c.
TP_DOMAIN tp_Datetimeltz_domain |
Definition at line 282 of file object_domain.c.
TP_DOMAIN tp_Datetimetz_domain |
Definition at line 278 of file object_domain.c.
Definition at line 147 of file object_domain.c.
TP_DOMAIN** tp_Domain_conversion_matrix[] |
Definition at line 506 of file object_domain.c.
|
static |
Definition at line 327 of file object_domain.c.
|
static |
Definition at line 434 of file object_domain.c.
TP_DOMAIN tp_Double_domain = { NULL, NULL, &tp_Double, DOMAIN_INIT4 (DB_DOUBLE_DECIMAL_PRECISION, 0) } |
Definition at line 238 of file object_domain.c.
Referenced by db_bit_count_dbval(), get_priority(), qdata_evaluate_analytic_func(), qexec_analytic_evaluate_offset_function(), qexec_resolve_domains_for_aggregation(), and round_double().
TP_DOMAIN tp_Elo_domain = { NULL, NULL, &tp_Elo, DOMAIN_INIT } |
Definition at line 265 of file object_domain.c.
TP_DOMAIN tp_Enumeration_domain |
Definition at line 294 of file object_domain.c.
TP_DOMAIN tp_Error_domain = { NULL, NULL, &tp_Error, DOMAIN_INIT } |
Definition at line 290 of file object_domain.c.
|
static |
Definition at line 428 of file object_domain.c.
TP_DOMAIN tp_Float_domain = { NULL, NULL, &tp_Float, DOMAIN_INIT4 (DB_FLOAT_DECIMAL_PRECISION, 0) } |
Definition at line 237 of file object_domain.c.
Referenced by check_timeout_value().
|
static |
Definition at line 148 of file object_domain.c.
Referenced by tp_final(), and tp_init().
|
static |
Definition at line 416 of file object_domain.c.
TP_DOMAIN tp_Integer_domain = { NULL, NULL, &tp_Integer, DOMAIN_INIT4 (DB_INTEGER_PRECISION, 0) } |
Definition at line 235 of file object_domain.c.
Referenced by do_set_trigger(), fetch_peek_arith(), pt_add_pseudocolumns_placeholders(), pt_evaluate_db_value_expr(), pt_make_regu_iscycle(), pt_make_regu_isleaf(), pt_make_regu_level(), pt_set_connect_by_xasl(), pt_to_aggregate_node(), qdata_load_agg_hentry_from_tuple(), qexec_alloc_agg_hash_context(), qexec_analytic_evaluate_offset_function(), qexec_execute_connect_by(), qexec_initialize_analytic_function_state(), qexec_recalc_tuples_parent_pos_in_list(), qexec_resolve_domains_for_aggregation(), qexec_resolve_domains_for_group_by(), qexec_setup_topn_proc(), regu_init(), and stx_build().
TP_DOMAIN tp_Json_domain |
Definition at line 322 of file object_domain.c.
Referenced by db_value_to_json_value(), and qexec_resolve_domains_for_aggregation().
TP_DOMAIN tp_Midxkey_domain_list_heads[TP_NUM_MIDXKEY_DOMAIN_LIST] |
Definition at line 253 of file object_domain.c.
|
static |
Definition at line 394 of file object_domain.c.
|
static |
Definition at line 446 of file object_domain.c.
TP_DOMAIN tp_Monetary_domain = { NULL, NULL, &tp_Monetary, DOMAIN_INIT4 (DB_MONETARY_DECIMAL_PRECISION, 0) } |
Definition at line 240 of file object_domain.c.
|
static |
Definition at line 492 of file object_domain.c.
TP_DOMAIN tp_Multiset_domain = { NULL, NULL, &tp_Multiset, DOMAIN_INIT3 } |
Definition at line 249 of file object_domain.c.
Referenced by col_new(), set_op(), and setobj_get_domain().
|
static |
Definition at line 466 of file object_domain.c.
TP_DOMAIN tp_NChar_domain |
Definition at line 314 of file object_domain.c.
TP_DOMAIN tp_Null_domain = { NULL, NULL, &tp_Null, DOMAIN_INIT } |
Definition at line 233 of file object_domain.c.
Referenced by btree_range_opt_check_add_index_key(), catalog_fetch_btree_statistics(), or_pack_mem_value(), or_packed_value_size(), or_put_value(), pt_to_analytic_node(), pt_type_enum_to_db_domain(), qexec_resolve_domains_for_aggregation(), and qexec_resolve_domains_for_group_by().
|
static |
Definition at line 440 of file object_domain.c.
TP_DOMAIN tp_Numeric_domain |
Definition at line 298 of file object_domain.c.
TP_DOMAIN tp_Object_domain = { NULL, NULL, &tp_Object, DOMAIN_INIT3 } |
Definition at line 246 of file object_domain.c.
Referenced by put_object_set(), qexec_setup_list_id(), and tp_domain_resolve_value().
TP_DOMAIN tp_Oid_domain = { NULL, NULL, &tp_Oid, DOMAIN_INIT3 } |
Definition at line 292 of file object_domain.c.
TP_DOMAIN tp_Pointer_domain = { NULL, NULL, &tp_Pointer, DOMAIN_INIT } |
Definition at line 289 of file object_domain.c.
|
static |
Definition at line 496 of file object_domain.c.
TP_DOMAIN tp_Sequence_domain = { NULL, NULL, &tp_Sequence, DOMAIN_INIT3 } |
Definition at line 251 of file object_domain.c.
Referenced by col_new(), mr_data_readval_vobj(), and setobj_get_domain().
|
static |
Definition at line 488 of file object_domain.c.
TP_DOMAIN tp_Set_domain = { NULL, NULL, &tp_Set, DOMAIN_INIT3 } |
Definition at line 247 of file object_domain.c.
Referenced by col_new(), and setobj_get_domain().
|
static |
Definition at line 422 of file object_domain.c.
TP_DOMAIN tp_Short_domain = { NULL, NULL, &tp_Short, DOMAIN_INIT4 (DB_SHORT_PRECISION, 0) } |
Definition at line 234 of file object_domain.c.
|
static |
Definition at line 452 of file object_domain.c.
TP_DOMAIN tp_String_domain |
Definition at line 242 of file object_domain.c.
Referenced by db_value_to_json_key(), pt_add_pseudocolumns_placeholders(), qdata_evaluate_sys_connect_by_path(), qexec_execute_connect_by(), qexec_get_index_pseudocolumn_value_from_tuple(), and qexec_schema_get_type_desc().
TP_DOMAIN tp_Substructure_domain = { NULL, NULL, &tp_Substructure, DOMAIN_INIT3 } |
Definition at line 288 of file object_domain.c.
TP_DOMAIN tp_Time_domain = { NULL, NULL, &tp_Time, DOMAIN_INIT4 (DB_TIME_PRECISION, 0) } |
Definition at line 268 of file object_domain.c.
TP_DOMAIN tp_Timestampltz_domain = { NULL, NULL, &tp_Timestampltz, DOMAIN_INIT4 (DB_TIMESTAMP_PRECISION, 0) } |
Definition at line 271 of file object_domain.c.
TP_DOMAIN tp_Timestamptz_domain = { NULL, NULL, &tp_Timestamptz, DOMAIN_INIT4 (DB_TIMESTAMPTZ_PRECISION, 0) } |
Definition at line 270 of file object_domain.c.
TP_DOMAIN tp_Utime_domain = { NULL, NULL, &tp_Utime, DOMAIN_INIT4 (DB_TIMESTAMP_PRECISION, 0) } |
Definition at line 269 of file object_domain.c.
|
static |
Definition at line 484 of file object_domain.c.
TP_DOMAIN tp_VarBit_domain |
Definition at line 306 of file object_domain.c.
TP_DOMAIN tp_Variable_domain = { NULL, NULL, &tp_Variable, DOMAIN_INIT3 } |
Definition at line 286 of file object_domain.c.
Referenced by pt_type_enum_to_db_domain(), and qexec_alloc_agg_hash_context().
|
static |
Definition at line 473 of file object_domain.c.
TP_DOMAIN tp_VarNChar_domain |
Definition at line 318 of file object_domain.c.
TP_DOMAIN tp_Vobj_domain = { NULL, NULL, &tp_Vobj, DOMAIN_INIT3 } |
Definition at line 291 of file object_domain.c.
Referenced by col_new(), pt_make_regu_constant(), pt_make_vid(), setobj_get_domain(), and tp_domain_resolve_value().