29 #ifndef _OBJECT_PRIMITIVE_H_ 30 #define _OBJECT_PRIMITIVE_H_ 65 int size,
bool copy,
char *copy_buf,
int copy_buf_len);
70 int size,
bool copy,
char *copy_buf,
int copy_buf_len);
72 struct tp_domain * domain,
int do_coercion,
73 int total_order,
int *start_colp);
76 int do_coercion,
int total_order,
int *start_colp);
78 int total_order,
int *start_colp,
int collation);
113 pr_type (
const char *name_arg,
DB_TYPE id_arg,
int varp_arg,
int size_arg,
int disksize_arg,
int align_arg,
129 inline const char *
get_name ()
const;
155 inline void freemem (
void *memptr)
const;
161 int total_order,
int *start_colp,
int collation)
const;
168 char *copy_buf,
int copy_buf_len)
const;
170 int do_coercion,
int total_order,
int *start_colp)
const;
175 char *copy_buf,
int copy_buf_len)
const;
177 int do_coercion,
int total_order,
int *start_colp)
const;
307 int total_order,
int num_index_term,
int *start_colp,
308 int *result_size1,
int *result_size2,
int *diff_column,
309 bool * dom_is_desc,
bool * next_dom_is_desc);
337 int expected_decompressed_size);
342 int compress_buffer_size,
int *compressed_length);
347 #define PRIM_TEMPORARY_DISK_SIZE 256 348 #define PRIM_COMPRESSION_LENGTH_OFFSET 4 353 #define PRIM_STRING_MAXIMUM_DISK_SIZE(length) (OR_BYTE_SIZE + OR_INT_SIZE + OR_INT_SIZE + (length) + MAX_ALIGNMENT) 397 return (*
f_data_lengthmem) (
const_cast<void *
> (mem), const_cast<tp_domain *> (domain), 1);
411 return (*
f_data_lengthmem) (
const_cast<void *
> (mem), const_cast<tp_domain *> (domain), 0);
457 (*f_initmem) (memptr,
const_cast<tp_domain *
> (domain));
470 return (*
f_setmem) (memptr,
const_cast<tp_domain *
> (domain), const_cast<DB_VALUE *> (value));
482 return (*
f_setval) (dest, src, copy);
488 (*f_data_writemem) (buf,
const_cast<void *
> (memptr), const_cast <tp_domain *> (domain));
494 (*f_data_readmem) (buf, memptr,
const_cast<tp_domain *
> (domain), size);
505 int copy_buf_len)
const 515 return (*
f_index_lengthmem) (
const_cast<void *
> (memptr), const_cast<tp_domain *> (domain));
546 int copy_buf_len)
const 553 int total_order,
int * start_colp)
const 555 return (*
f_index_cmpdisk) (
const_cast<void *
> (memptr1), const_cast<void *> (memptr2),
556 const_cast<tp_domain *
> (domain), do_coercion, total_order, start_colp);
564 (*f_freemem) (memptr);
570 int total_order,
int * start_colp)
const 572 return (*
f_data_cmpdisk) (
const_cast<void *
> (memptr1), const_cast<void *> (memptr2),
573 const_cast<tp_domain *
> (domain), do_coercion, total_order, start_colp);
580 return (*
f_cmpval) (
const_cast<DB_VALUE *
> (value), const_cast<DB_VALUE *> (value2), do_coercion, total_order,
581 start_colp, collation);
int pr_midxkey_add_elements(DB_VALUE *keyval, DB_VALUE *dbvals, int num_dbvals, struct tp_domain *dbvals_domain_list)
initmem_function_type f_initmem
int data_readval(struct or_buf *buf, DB_VALUE *value, const tp_domain *domain, int size, bool copy, char *copy_buf, int copy_buf_len) const
index_readval_function_type f_index_readval
int pr_clear_compressed_string(DB_VALUE *value)
PR_TYPE * tp_Type_datetime
DB_VALUE_COMPARE_RESULT(* data_cmpdisk_function_type)(void *memptr1, void *memptr2, tp_domain *domain, int do_coercion, int total_order, int *start_colp)
int(* data_lengthval_function_type)(DB_VALUE *value, int disk)
int index_readval(struct or_buf *buf, DB_VALUE *value, const tp_domain *domain, int size, bool copy, char *copy_buf, int copy_buf_len) const
int(* index_writeval_function_type)(struct or_buf *buf, DB_VALUE *value)
int data_writeval(struct or_buf *buf, const DB_VALUE *value) const
int pr_Inhibit_oid_promotion
PR_TYPE * pr_find_type(const char *name)
int(* setmem_function_type)(void *memptr, struct tp_domain *domain, DB_VALUE *value)
int get_index_size_of_value(const DB_VALUE *value) const
data_cmpdisk_function_type get_data_cmpdisk_function() const
PR_TYPE * tp_Type_pointer
int pr_is_string_type(DB_TYPE type)
freemem_function_type f_freemem
const char * pr_type_name(DB_TYPE id)
void initval(DB_VALUE *value, int precision, int scale) const
cmpval_function_type get_cmpval_function() const
data_writemem_function_type f_data_writemem
DB_VALUE * pr_make_ext_value(void)
index_cmpdisk_function_type f_index_cmpdisk
PR_TYPE * tp_Type_numeric
void pr_clear_value_vector(std::vector< DB_VALUE > &value_vector)
int(* index_lengthmem_function_type)(void *memptr, struct tp_domain *domain)
void(* initval_function_type)(DB_VALUE *value, int precision, int scale)
PR_TYPE * tp_Type_resultset
int(* index_lengthval_function_type)(DB_VALUE *value)
DB_VALUE_COMPARE_RESULT cmpval(const DB_VALUE *value, const DB_VALUE *value2, int do_coercion, int total_order, int *start_colp, int collation) const
int pr_get_size_and_write_string_to_buffer(struct or_buf *buf, char *val_p, DB_VALUE *value, int *val_size, int align)
int pr_get_compression_length(const char *string, int str_length)
int index_writeval(struct or_buf *buf, const DB_VALUE *value) const
DB_VALUE_COMPARE_RESULT(* cmpval_function_type)(DB_VALUE *value, DB_VALUE *value2, int do_coercion, int total_order, int *start_colp, int collation)
void data_readmem(struct or_buf *buf, void *memptr, const tp_domain *domain, int size) const
PR_TYPE * tp_Type_integer
void set_cmpval_function(cmpval_function_type cmpval_arg)
PR_TYPE * tp_Type_midxkey
int getmem(void *memptr, const tp_domain *domain, DB_VALUE *value, bool copy=true) const
int pr_clone_value(const DB_VALUE *src, DB_VALUE *dest)
DB_VALUE * pr_make_value(void)
void(* data_writemem_function_type)(struct or_buf *buf, void *memptr, struct tp_domain *domain)
data_readval_function_type f_data_readval
int get_mem_size_of_mem(const void *mem, const tp_domain *domain=NULL) const
int pr_is_prefix_key_type(DB_TYPE type)
PR_TYPE * tp_Type_substructure
void(* data_readmem_function_type)(struct or_buf *buf, void *memptr, struct tp_domain *domain, int size)
int(* data_readval_function_type)(struct or_buf *buf, DB_VALUE *value, struct tp_domain *domain, int size, bool copy, char *copy_buf, int copy_buf_len)
void set_data_cmpdisk_function(data_cmpdisk_function_type data_cmpdisk_arg)
DB_VALUE_COMPARE_RESULT data_cmpdisk(const void *memptr1, const void *memptr2, const tp_domain *domain, int do_coercion, int total_order, int *start_colp) const
void data_writemem(struct or_buf *buf, const void *memptr, const tp_domain *domain) const
int setmem(void *memptr, const tp_domain *domain, const DB_VALUE *value) const
int pr_value_mem_size(const DB_VALUE *value)
int pr_midxkey_element_disk_size(char *mem, DB_DOMAIN *domain)
void(* freemem_function_type)(void *memptr)
getmem_function_type f_getmem
PR_TYPE * tp_Type_multiset
data_cmpdisk_function_type f_data_cmpdisk
int pr_is_variable_type(DB_TYPE type)
setval_function_type f_setval
int pr_data_compress_string(const char *string, int str_length, char *compressed_string, int compress_buffer_size, int *compressed_length)
int(* data_lengthmem_function_type)(void *memptr, struct tp_domain *domain, int disk)
int pr_data_writeval_disk_size(DB_VALUE *value)
int pr_do_db_value_string_compression(DB_VALUE *value)
int(* data_writeval_function_type)(struct or_buf *buf, DB_VALUE *value)
bool is_always_variable() const
data_lengthval_function_type f_data_lengthval
int pr_midxkey_remove_prefix(DB_VALUE *key, int prefix)
DB_VALUE_COMPARE_RESULT(* index_cmpdisk_function_type)(void *memptr1, void *memptr2, struct tp_domain *domain, int do_coercion, int total_order, int *start_colp)
data_lengthmem_function_type f_data_lengthmem
int pr_midxkey_unique_prefix(const DB_VALUE *db_midxkey1, const DB_VALUE *db_midxkey2, DB_VALUE *db_result)
void initmem(void *memptr, const tp_domain *domain) const
int pr_midxkey_common_prefix(DB_VALUE *key1, DB_VALUE *key2)
PR_TYPE * tp_Type_monetary
PR_TYPE * tp_Type_varnchar
int pr_free_ext_value(DB_VALUE *value)
void PRIM_SET_NULL(DB_VALUE *value)
bool pr_is_set_type(DB_TYPE type)
need_clear_type need_clear
int pr_clear_value(DB_VALUE *var)
void(* initmem_function_type)(void *memptr, struct tp_domain *domain)
void pr_data_writeval(struct or_buf *buf, DB_VALUE *value)
struct db_domain_info::general_info general_info
index_lengthmem_function_type f_index_lengthmem
size_t get_alignment() const
int get_mem_size_of_value(const DB_VALUE *value) const
index_lengthval_function_type f_index_lengthval
int get_index_size_of_mem(const void *memptr, const tp_domain *domain) const
index_writeval_function_type f_index_writeval
data_readmem_function_type f_data_readmem
int pr_get_compressed_data_from_buffer(struct or_buf *buf, char *data, int compressed_size, int expected_decompressed_size)
DB_VALUE_COMPARE_RESULT pr_midxkey_compare(DB_MIDXKEY *mul1, DB_MIDXKEY *mul2, int do_coercion, int total_order, int num_index_term, int *start_colp, int *result_size1, int *result_size2, int *diff_column, bool *dom_is_desc, bool *next_dom_is_desc)
int pr_complete_enum_value(DB_VALUE *value, struct tp_domain *domain)
int(* index_readval_function_type)(struct or_buf *buf, DB_VALUE *value, struct tp_domain *domain, int size, bool copy, char *copy_buf, int copy_buf_len)
int(* getmem_function_type)(void *memptr, struct tp_domain *domain, DB_VALUE *value, bool copy)
setmem_function_type f_setmem
initval_function_type f_initval
DB_VALUE * pr_copy_value(DB_VALUE *var)
bool is_size_computed() const
const char * get_name() const
PR_TYPE * pr_type_from_id(DB_TYPE id)
int pr_midxkey_init_boundbits(char *bufptr, int n_atts)
int pr_Enable_string_compression
char * pr_valstring(const DB_VALUE *)
void freemem(void *memptr) const
PR_TYPE * tp_Type_id_map[]
int pr_midxkey_get_element_nocopy(const DB_MIDXKEY *midxkey, int index, DB_VALUE *value, int *prev_indexp, char **prev_ptrp)
data_writeval_function_type f_data_writeval
int setval(DB_VALUE *dest, const DB_VALUE *src, bool copy) const
cmpval_function_type f_cmpval
PR_TYPE * tp_Type_sequence
int get_disk_size_of_mem(const void *mem, const tp_domain *domain=NULL) const
DB_VALUE_COMPARE_RESULT index_cmpdisk(const void *memptr1, const void *memptr2, const tp_domain *domain, int do_coercion, int total_order, int *start_colp) const
int pr_midxkey_get_element_offset(const DB_MIDXKEY *midxkey, int index)
int pr_midxkey_add_prefix(DB_VALUE *result, DB_VALUE *prefix, DB_VALUE *postfix, int n_prefix)
int pr_free_value(DB_VALUE *var)
int pr_index_writeval_disk_size(DB_VALUE *value)
int get_disk_size_of_value(const DB_VALUE *value) const
PR_TYPE * tp_Type_variable
int pr_mem_size(const PR_TYPE *type)
int(* setval_function_type)(DB_VALUE *dest, const DB_VALUE *src, bool copy)