CUBRID Engine  latest
set_object.h File Reference
#include "config.h"
#include "dbtype_def.h"
#include "error_manager.h"
#include "object_domain.h"
#include "locator.h"
#include "parser.h"
Include dependency graph for set_object.h:

Go to the source code of this file.

Classes

struct  setobj
 
struct  set_iterator
 

Macros

#define SET_DUPLICATE_VALUE   (1)
 
#define IMPLICIT   (1)
 
#define COL_BLOCK_SIZE   (64)
 
#define EXPAND(blockindex)   ((int) (((blockindex)*1.1) + 1))
 
#define BLOCK(collection_index)   ((int) ((collection_index)/COL_BLOCK_SIZE))
 
#define OFFSET(collection_index)   ((int) ((collection_index)%COL_BLOCK_SIZE))
 
#define INDEX(collection, index)   (&(collection->array[BLOCK(index)][OFFSET(index)]))
 
#define BLOCKING_LESS1   (COL_BLOCK_SIZE -1)
 
#define VALUETOP(col)   ((col->topblock * COL_BLOCK_SIZE) + col->topblockcount)
 
#define COLBLOCKSIZE(n)   (sizeof(COL_BLOCK) + (n * sizeof(DB_VALUE)))
 
#define BLOCK_START(block)
 
#define OBJECT_HAS_TEMP_OID(obj)   ((WS_OID(obj) == NULL) ? 0 : OID_ISTEMP(WS_OID(obj)))
 

Typedefs

typedef struct setobj SETOBJ
 
typedef SETOBJ COL
 
typedef struct set_iterator SET_ITERATOR
 

Functions

DB_COLLECTIONset_create (DB_TYPE type, int initial_size)
 
int set_area_init (void)
 
void set_area_final (void)
 
void set_area_reset ()
 
DB_COLLECTIONset_create_basic (void)
 
DB_COLLECTIONset_create_multi (void)
 
DB_COLLECTIONset_create_sequence (int size)
 
DB_COLLECTIONset_create_with_domain (TP_DOMAIN *domain, int initial_size)
 
DB_COLLECTIONset_make_reference (void)
 
DB_COLLECTIONset_copy (DB_COLLECTION *set)
 
void set_free (DB_COLLECTION *set)
 
DB_COLLECTIONset_coerce (DB_COLLECTION *set, TP_DOMAIN *domain, bool implicit_coercion)
 
int set_filter (DB_COLLECTION *set)
 
int set_get_element (DB_COLLECTION *set, int index, DB_VALUE *value)
 
int set_get_element_nocopy (DB_COLLECTION *set, int index, DB_VALUE *value)
 
int set_add_element (DB_COLLECTION *set, DB_VALUE *value)
 
int set_put_element (DB_COLLECTION *set, int index, DB_VALUE *value)
 
int set_insert_element (DB_COLLECTION *set, int index, DB_VALUE *value)
 
int set_drop_element (DB_COLLECTION *set, DB_VALUE *value, bool match_nulls)
 
int set_drop_seq_element (DB_COLLECTION *set, int index)
 
int set_find_seq_element (DB_COLLECTION *set, DB_VALUE *value, int index)
 
int set_difference (DB_COLLECTION *collection1, DB_COLLECTION *collection2, DB_COLLECTION **result, DB_DOMAIN *domain)
 
int set_union (DB_COLLECTION *collection1, DB_COLLECTION *collection2, DB_COLLECTION **result, DB_DOMAIN *domain)
 
int set_intersection (DB_COLLECTION *collection1, DB_COLLECTION *collection2, DB_COLLECTION **result, DB_DOMAIN *domain)
 
void set_make_collection (DB_VALUE *value, DB_COLLECTION *col)
 
int set_cardinality (DB_COLLECTION *set)
 
int set_size (DB_COLLECTION *set)
 
bool set_isempty (DB_COLLECTION *set)
 
bool set_has_null (DB_COLLECTION *set)
 
bool set_ismember (DB_COLLECTION *set, DB_VALUE *value)
 
int set_issome (DB_VALUE *value, DB_COLLECTION *set, PT_OP_TYPE op, int do_coercion)
 
int set_convert_oids_to_objects (DB_COLLECTION *set)
 
DB_TYPE set_get_type (DB_COLLECTION *set)
 
DB_VALUE_COMPARE_RESULT set_compare_order (DB_COLLECTION *set1, DB_COLLECTION *set2, int do_coercion, int total_order)
 
DB_VALUE_COMPARE_RESULT set_compare (DB_COLLECTION *set1, DB_COLLECTION *set2, int do_coercion)
 
DB_VALUE_COMPARE_RESULT set_seq_compare (DB_COLLECTION *set1, DB_COLLECTION *set2, int do_coercion, int total_order)
 
DB_VALUE_COMPARE_RESULT vobj_compare (DB_COLLECTION *set1, DB_COLLECTION *set2, int do_coercion, int total_order)
 
TP_DOMAIN_STATUS set_check_domain (DB_COLLECTION *set, TP_DOMAIN *domain)
 
TP_DOMAINset_get_domain (DB_COLLECTION *set)
 
void set_fprint (FILE *fp, DB_COLLECTION *set)
 
void set_print (DB_COLLECTION *set)
 
void set_final (void)
 
int set_optimize (DB_COLLECTION *ref)
 
DB_VALUE_COMPARE_RESULT setvobj_compare (COL *set1, COL *set2, int do_coercion, int total_order)
 
int set_connect (DB_COLLECTION *ref, MOP owner, int attid, TP_DOMAIN *domain)
 
int set_disconnect (DB_COLLECTION *ref)
 
DB_COLLECTIONset_change_owner (DB_COLLECTION *ref, MOP owner, int attid, TP_DOMAIN *domain)
 
int set_get_setobj (DB_COLLECTION *ref, COL **setptr, int for_write)
 
DB_VALUEset_new_element (DB_COLLECTION *ref)
 
SET_ITERATORset_iterate (DB_COLLECTION *set)
 
void set_iterator_free (SET_ITERATOR *it)
 
DB_VALUEset_iterator_value (SET_ITERATOR *it)
 
int set_iterator_next (SET_ITERATOR *it)
 
void set_free_block (DB_VALUE *in_block)
 
int col_value_compare (DB_VALUE *a, DB_VALUE *b)
 
int col_sort (COL *col)
 
int col_expand (COL *col, long i)
 
COLcol_new (long size, int settype)
 
int col_has_null (COL *col)
 
long col_find (COL *col, long *found, DB_VALUE *val, int do_coerce)
 
int col_put (COL *col, long colindex, DB_VALUE *val)
 
int col_insert (COL *col, long colindex, DB_VALUE *val)
 
int col_delete (COL *col, long colindex)
 
int col_add (COL *col, DB_VALUE *val)
 
int col_drop (COL *col, DB_VALUE *val)
 
int col_drop_nulls (COL *col)
 
int col_permanent_oids (COL *col)
 
int set_tform_disk_set (DB_COLLECTION *ref, COL **setptr)
 
COLsetobj_create_with_domain (TP_DOMAIN *domain, int initial_size)
 
COLsetobj_create (DB_TYPE collection_type, int size)
 
void setobj_clear (COL *col)
 
void setobj_free (COL *col)
 
COLsetobj_copy (COL *col)
 
int setobj_sort (COL *col)
 
TP_DOMAIN_STATUS setobj_check_domain (COL *col, TP_DOMAIN *domain)
 
TP_DOMAINsetobj_get_domain (COL *set)
 
void swizzle_value (DB_VALUE *val, int input)
 
int setobj_filter (COL *col, int filter, int *cardptr)
 
int setobj_size (COL *col)
 
int setobj_cardinality (COL *col)
 
bool setobj_isempty (COL *col)
 
bool setobj_ismember (COL *col, DB_VALUE *proposed_value, int check_null)
 
DB_VALUE_COMPARE_RESULT setobj_compare (COL *set1, COL *set2, int do_coercion)
 
DB_VALUE_COMPARE_RESULT setobj_compare_order (COL *set1, COL *set2, int do_coercion, int total_order)
 
int setobj_difference (COL *set1, COL *set2, COL *result)
 
int setobj_union (COL *set1, COL *set2, COL *result)
 
int setobj_intersection (COL *set1, COL *set2, COL *result)
 
int setobj_issome (DB_VALUE *value, COL *set, PT_OP_TYPE op, int do_coercion)
 
int setobj_convert_oids_to_objects (COL *col)
 
int setobj_get_element_ptr (COL *col, int index, DB_VALUE **result)
 
int setobj_get_element (COL *set, int index, DB_VALUE *value)
 
int setobj_add_element (COL *col, DB_VALUE *value)
 
int setobj_put_element (COL *col, int index, DB_VALUE *value)
 
int setobj_insert_element (COL *col, int index, DB_VALUE *value)
 
int setobj_drop_element (COL *col, DB_VALUE *value, bool match_nulls)
 
int setobj_drop_seq_element (COL *col, int index)
 
int setobj_find_seq_element (COL *col, DB_VALUE *value, int index)
 
COLsetobj_coerce (COL *col, TP_DOMAIN *domain, bool implicit_coercion)
 
void setobj_print (FILE *fp, COL *col)
 
TP_DOMAINsetobj_domain (COL *set)
 
void setobj_put_domain (COL *set, TP_DOMAIN *domain)
 
int setobj_put_value (COL *col, int index, DB_VALUE *value)
 
DB_COLLECTIONsetobj_get_reference (COL *set)
 
int setobj_release (COL *set)
 
int setobj_build_domain_from_col (COL *col, TP_DOMAIN **set_domain)
 

Macro Definition Documentation

#define BLOCK (   collection_index)    ((int) ((collection_index)/COL_BLOCK_SIZE))
#define BLOCK_START (   block)
Value:
((COL_BLOCK *) \
((char *)block - offsetof(struct collect_block, val)))

Definition at line 58 of file set_object.h.

Referenced by realloc_block(), and set_free_block().

#define BLOCKING_LESS1   (COL_BLOCK_SIZE -1)

Definition at line 55 of file set_object.h.

Referenced by col_bsearch(), col_delete(), col_expand_blocks(), col_insert(), and non_null_index().

#define COL_BLOCK_SIZE   (64)
#define COLBLOCKSIZE (   n)    (sizeof(COL_BLOCK) + (n * sizeof(DB_VALUE)))

Definition at line 57 of file set_object.h.

Referenced by new_block(), and realloc_block().

#define EXPAND (   blockindex)    ((int) (((blockindex)*1.1) + 1))

Definition at line 50 of file set_object.h.

Referenced by col_expand_array().

#define IMPLICIT   (1)

Definition at line 41 of file set_object.h.

Referenced by set_op(), setobj_add_element(), setobj_insert_element(), and setobj_put_element().

#define OBJECT_HAS_TEMP_OID (   obj)    ((WS_OID(obj) == NULL) ? 0 : OID_ISTEMP(WS_OID(obj)))

Definition at line 64 of file set_object.h.

Referenced by col_find(), col_insert(), col_permanent_oids(), col_put(), and setobj_sort().

#define OFFSET (   collection_index)    ((int) ((collection_index)%COL_BLOCK_SIZE))

Definition at line 53 of file set_object.h.

Referenced by col_bsearch(), col_delete(), col_expand(), col_insert(), col_put(), and col_sort().

#define SET_DUPLICATE_VALUE   (1)
#define VALUETOP (   col)    ((col->topblock * COL_BLOCK_SIZE) + col->topblockcount)

Definition at line 56 of file set_object.h.

Referenced by col_expand(), and col_expand_blocks().

Typedef Documentation

typedef SETOBJ COL

Definition at line 96 of file set_object.h.

typedef struct set_iterator SET_ITERATOR
typedef struct setobj SETOBJ

Definition at line 67 of file set_object.h.

Function Documentation

int col_add ( COL col,
DB_VALUE val 
)
int col_drop ( COL col,
DB_VALUE val 
)

Definition at line 1690 of file set_object.c.

References col_delete(), col_find(), setobj::coltype, DB_TYPE_SEQUENCE, DB_TYPE_SET, ER_GENERIC_ERROR, error(), i, INDEX, NO_ERROR, and PRIM_SET_NULL().

Referenced by setobj_drop_element().

Here is the caller graph for this function:

int col_drop_nulls ( COL col)

Definition at line 1730 of file set_object.c.

References col_delete(), setobj::coltype, DB_IS_NULL, DB_TYPE_MULTISET, DB_TYPE_SET, ER_GENERIC_ERROR, error(), i, INDEX, NO_ERROR, setobj::size, and setobj::sorted.

Referenced by setobj_drop_element().

Here is the caller graph for this function:

int col_expand ( COL col,
long  i 
)

Definition at line 774 of file set_object.c.

References BLOCK, col_expand_blocks(), err, NO_ERROR, OFFSET, setobj::size, and VALUETOP.

Referenced by col_insert(), col_new(), col_put(), set_new_element(), and setobj_copy().

Here is the caller graph for this function:

long col_find ( COL col,
long *  found,
DB_VALUE val,
int  do_coerce 
)
int col_has_null ( COL col)

Definition at line 1033 of file set_object.c.

References setobj::coltype, DB_IS_NULL, DB_TYPE_MULTISET, DB_TYPE_SET, i, INDEX, setobj::size, and setobj::sorted.

Referenced by set_has_null(), setobj_compare_order(), setobj_ismember(), and setobj_issome().

Here is the caller graph for this function:

int col_sort ( COL col)

Definition at line 570 of file set_object.c.

References setobj::array, BLOCK, COL_BLOCK_SIZE, col_debug(), col_move_nulls(), col_successive_merge(), col_value_compare(), debug_level, error(), i, NO_ERROR, OFFSET, setobj::size, and setobj::sorted.

Referenced by setobj_sort().

Here is the caller graph for this function:

int col_value_compare ( DB_VALUE a,
DB_VALUE b 
)

Definition at line 312 of file set_object.c.

References tp_value_compare().

Referenced by col_merge_run(), col_sort(), and setobj_coerce().

Here is the caller graph for this function:

void set_area_final ( void  )

Definition at line 189 of file set_object.c.

References area_destroy(), and NULL.

Referenced by set_area_init(), and ws_init().

Here is the caller graph for this function:

int set_area_init ( void  )

Definition at line 149 of file set_object.c.

References area_create(), assert, col_initialize(), er_errid(), error(), NO_ERROR, NULL, SET_AREA_COUNT, and set_area_final().

Referenced by boot_restart_server(), col_new(), set_make_reference(), ws_init(), and xboot_initialize_server().

Here is the caller graph for this function:

void set_area_reset ( )

Definition at line 205 of file set_object.c.

References NULL.

Referenced by area_final().

Here is the caller graph for this function:

int set_cardinality ( DB_COLLECTION set)
DB_COLLECTION* set_change_owner ( DB_COLLECTION ref,
MOP  owner,
int  attid,
TP_DOMAIN domain 
)
TP_DOMAIN_STATUS set_check_domain ( DB_COLLECTION set,
TP_DOMAIN domain 
)

Definition at line 3604 of file set_object.c.

References DOMAIN_ERROR, DOMAIN_INCOMPATIBLE, error(), NO_ERROR, NULL, set_get_setobj(), setobj_check_domain(), and ws_pin().

Referenced by tp_domain_select().

Here is the caller graph for this function:

DB_COLLECTION* set_coerce ( DB_COLLECTION set,
TP_DOMAIN domain,
bool  implicit_coercion 
)

Definition at line 3645 of file set_object.c.

References error(), NO_ERROR, NULL, setobj::references, db_set::set, set_get_setobj(), set_make_reference(), setobj_coerce(), setobj_free(), and ws_pin().

Referenced by tp_value_cast_internal().

Here is the caller graph for this function:

DB_VALUE_COMPARE_RESULT set_compare ( DB_COLLECTION set1,
DB_COLLECTION set2,
int  do_coercion 
)

Definition at line 3411 of file set_object.c.

References DB_UNK, error(), NO_ERROR, NULL, db_set::owner, set_get_setobj(), setobj_compare(), and ws_pin().

Referenced by tp_set_compare(), and vid_compare_non_updatable_objects().

Here is the caller graph for this function:

DB_VALUE_COMPARE_RESULT set_compare_order ( DB_COLLECTION set1,
DB_COLLECTION set2,
int  do_coercion,
int  total_order 
)

Definition at line 3359 of file set_object.c.

References DB_UNK, error(), NO_ERROR, NULL, db_set::owner, set_get_setobj(), setobj_compare_order(), and ws_pin().

Referenced by mr_cmpval_set().

Here is the caller graph for this function:

int set_connect ( DB_COLLECTION ref,
MOP  owner,
int  attid,
TP_DOMAIN domain 
)

Definition at line 2231 of file set_object.c.

References db_set::attribute, setobj::domain, NO_ERROR, NULL, db_set::owner, db_set::ref_link, and db_set::set.

Referenced by get_set_value(), and set_change_owner().

Here is the caller graph for this function:

int set_convert_oids_to_objects ( DB_COLLECTION set)
DB_COLLECTION* set_create ( DB_TYPE  type,
int  initial_size 
)

Definition at line 2373 of file set_object.c.

References NULL, setobj::references, db_set::set, set_make_reference(), setobj_create(), and setobj_free().

Referenced by db_col_create(), jsp_unpack_set_value(), set_create_basic(), set_create_multi(), and set_create_sequence().

Here is the caller graph for this function:

DB_COLLECTION* set_create_basic ( void  )

Definition at line 2407 of file set_object.c.

References DB_TYPE_SET, and set_create().

Referenced by au_compute_groups(), au_drop_user(), au_make_user(), db_set_create(), and db_set_create_basic().

Here is the caller graph for this function:

DB_COLLECTION* set_create_multi ( void  )

Definition at line 2419 of file set_object.c.

References DB_TYPE_MULTISET, and set_create().

Referenced by db_set_create(), and db_set_create_multi().

Here is the caller graph for this function:

DB_COLLECTION* set_create_with_domain ( TP_DOMAIN domain,
int  initial_size 
)
int set_difference ( DB_COLLECTION collection1,
DB_COLLECTION collection2,
DB_COLLECTION **  result,
DB_DOMAIN domain 
)

Definition at line 3905 of file set_object.c.

References set_op(), and setobj_difference().

Referenced by pt_difference_sets(), and qdata_subtract_sequence_to_dbval().

Here is the caller graph for this function:

int set_disconnect ( DB_COLLECTION ref)

Definition at line 2268 of file set_object.c.

References db_set::attribute, error(), NO_ERROR, NULL, db_set::owner, and db_set::ref_link.

Referenced by assign_set_value(), and setobj_release().

Here is the caller graph for this function:

int set_drop_element ( DB_COLLECTION set,
DB_VALUE value,
bool  match_nulls 
)

Definition at line 2842 of file set_object.c.

References assert, error(), NO_ERROR, NULL, obj_lock(), SCH_M_LOCK, set_get_setobj(), setobj_drop_element(), ws_class_mop(), ws_get_lock(), ws_pin(), and X_LOCK.

Referenced by db_col_drop(), db_col_drop_nulls(), db_set_drop(), and unregister_user_trigger().

Here is the caller graph for this function:

int set_drop_seq_element ( DB_COLLECTION set,
int  index 
)
void set_final ( void  )

Definition at line 297 of file set_object.c.

References col_init.

Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), and boot_server_all_finalize().

Here is the caller graph for this function:

int set_find_seq_element ( DB_COLLECTION set,
DB_VALUE value,
int  index 
)

Definition at line 2962 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_find_seq_element(), and ws_pin().

Referenced by db_col_find(), and db_seq_find().

Here is the caller graph for this function:

void set_fprint ( FILE *  fp,
DB_COLLECTION set 
)

Definition at line 3696 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_print(), and ws_pin().

Referenced by db_col_fprint(), and set_print().

Here is the caller graph for this function:

void set_free ( DB_COLLECTION set)

Definition at line 2560 of file set_object.c.

References free_set_reference().

Referenced by adjust_partition_range(), apply_grants(), assign_set_value(), au_add_direct_groups(), au_add_member_internal(), au_add_user(), au_check_serial_authorization(), au_compute_groups(), au_drop_member(), au_drop_user(), au_dump_user(), au_export_users(), au_grant(), au_is_dba_group_member(), au_make_user(), au_print_auth(), au_revoke(), build_class_grant_list(), catcls_get_object_set(), catcls_insert_subset(), catcls_update_subset(), classobj_clear_attribute_value(), classobj_free_partition_info(), classobj_free_prop(), classobj_make_index_filter_pred_seq(), classobj_put_index(), classobj_put_seq_with_name_and_iterate(), collect_class_grants(), db_col_free(), db_seq_free(), db_set_free(), disk_to_methfile(), disk_to_representation(), do_insert_template(), find_all_triggers(), get_grants(), get_property_list(), get_user_trigger_objects(), heap_get_class_partitions(), insert_subquery_results(), jsp_add_stored_procedure(), jsp_unpack_set_value(), obj_find_primary_key(), obj_make_key_value(), or_get_constraint_comment(), pr_clear_value(), cubload::server_object_loader::process_collection_constant(), propagate_revoke(), pt_node_to_partition_info(), qdata_convert_dbvals_to_set(), qdata_convert_table_to_set(), register_user_trigger(), set_op(), tr_dump_selective_triggers(), tr_status_as_string(), tr_update_user_cache(), trigger_table_add(), trigger_table_drop(), trigger_table_find(), trigger_table_rename(), unregister_user_trigger(), and update_cache().

void set_free_block ( DB_VALUE in_block)

Definition at line 278 of file set_object.c.

References BLOCK_START, db_private_free_and_init, and NULL.

Referenced by col_delete(), and setobj_clear().

Here is the caller graph for this function:

TP_DOMAIN* set_get_domain ( DB_COLLECTION set)

Definition at line 3319 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_get_domain(), and ws_pin().

Referenced by cache_validation(), db_col_domain(), quick_validate(), and tp_domain_resolve_value().

Here is the caller graph for this function:

int set_get_element ( DB_COLLECTION set,
int  index,
DB_VALUE value 
)

Definition at line 2575 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_get_element(), and ws_pin().

Referenced by apply_grants(), au_add_direct_groups(), au_compute_groups(), au_drop_user(), au_dump_user(), au_export_users(), au_force_write_new_auth(), au_grant(), au_print_grant_entry(), au_propagate_del_new_auth(), au_revoke(), au_set_get_obj(), build_class_grant_list(), catcls_delete_subset(), catcls_get_or_value_from_attribute(), catcls_get_or_value_from_indexes(), catcls_update_subset(), classobj_cache_constraint_entry(), classobj_cache_constraint_list(), classobj_change_constraint_comment(), classobj_change_constraint_status(), classobj_check_function_constraint_info(), classobj_drop_foreign_key_ref(), classobj_drop_prop(), classobj_get_prop(), classobj_make_class_constraints(), classobj_make_foreign_key_info(), classobj_make_foreign_key_ref(), classobj_make_foreign_key_ref_list(), classobj_make_index_filter_pred_info(), classobj_print_props(), classobj_put_foreign_key_ref(), classobj_put_prop(), collect_class_grants(), db_col_get(), db_seq_get(), db_set_get(), object_printer::describe_partition_info(), object_printer::describe_partition_parts(), db_value_printer::describe_set(), drop_stored_procedure(), emit_stored_procedure_args(), eval_item_card_set(), eval_some_eval(), eval_sub_multi_set_to_sort_list(), fetch_set_internal(), find_all_triggers(), find_grant_entry(), flatten_properties(), fprint_special_set(), get_grants(), get_user_trigger_objects(), jsp_do_call_stored_procedure(), jsp_get_value_size(), jsp_pack_set_argument(), mht_valhash(), obj_find_object_by_cons_and_key(), print_set(), propagate_revoke(), tr_dump_selective_triggers(), tr_status_as_string(), tr_update_user_cache(), trigger_table_drop(), trigger_table_find(), trigger_table_rename(), and valcnv_convert_set_to_string().

DB_TYPE set_get_type ( DB_COLLECTION set)

Definition at line 3566 of file set_object.c.

References setobj::coltype, DB_TYPE_NULL, error(), NO_ERROR, NULL, set_get_setobj(), and ws_pin().

Referenced by db_col_insert(), db_col_put(), db_col_type(), db_set_type(), and mr_data_readval_set().

Here is the caller graph for this function:

bool set_has_null ( DB_COLLECTION set)

Definition at line 3160 of file set_object.c.

References col_has_null(), error(), NO_ERROR, NULL, set_get_setobj(), and ws_pin().

Referenced by db_set_has_null().

Here is the caller graph for this function:

int set_insert_element ( DB_COLLECTION set,
int  index,
DB_VALUE value 
)

Definition at line 2781 of file set_object.c.

References assert, error(), NO_ERROR, NULL, obj_lock(), SCH_M_LOCK, set_get_setobj(), setobj_insert_element(), ws_class_mop(), ws_get_lock(), ws_pin(), and X_LOCK.

Referenced by db_col_insert(), db_seq_insert(), and register_user_trigger().

Here is the caller graph for this function:

int set_intersection ( DB_COLLECTION collection1,
DB_COLLECTION collection2,
DB_COLLECTION **  result,
DB_DOMAIN domain 
)

Definition at line 3951 of file set_object.c.

References set_op(), and setobj_intersection().

Referenced by pt_product_sets(), and qdata_multiply_sequence_to_dbval().

Here is the caller graph for this function:

bool set_isempty ( DB_COLLECTION set)

Definition at line 3074 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_isempty(), and ws_pin().

Referenced by db_set_isempty().

Here is the caller graph for this function:

bool set_ismember ( DB_COLLECTION set,
DB_VALUE value 
)
int set_issome ( DB_VALUE value,
DB_COLLECTION set,
PT_OP_TYPE  op,
int  do_coercion 
)

Definition at line 3240 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_issome(), and ws_pin().

Referenced by pt_evaluate_db_value_expr().

Here is the caller graph for this function:

void set_iterator_free ( SET_ITERATOR it)

Definition at line 4188 of file set_object.c.

References free_iterator().

Referenced by process_set(), and pt_bind_set_type().

Here is the caller graph for this function:

int set_iterator_next ( SET_ITERATOR it)

Definition at line 4236 of file set_object.c.

References INDEX, NULL, set_iterator::position, set_iterator::set, setobj_size(), and set_iterator::value.

Referenced by process_set(), and pt_bind_set_type().

Here is the caller graph for this function:

DB_VALUE* set_iterator_value ( SET_ITERATOR it)

Definition at line 4201 of file set_object.c.

References NULL, and set_iterator::value.

Referenced by process_set(), and pt_bind_set_type().

Here is the caller graph for this function:

DB_VALUE* set_new_element ( DB_COLLECTION ref)
int set_optimize ( DB_COLLECTION ref)

Definition at line 4049 of file set_object.c.

References error(), NO_ERROR, NULL, db_set::owner, db_set::set, set_get_setobj(), setobj_sort(), setobj::sorted, and ws_pin().

Referenced by col_permanent_oids(), and db_col_optimize().

Here is the caller graph for this function:

void set_print ( DB_COLLECTION set)

Definition at line 3731 of file set_object.c.

References set_fprint().

Referenced by classobj_print_props(), db_seq_print(), and db_set_print().

Here is the caller graph for this function:

DB_VALUE_COMPARE_RESULT set_seq_compare ( DB_COLLECTION set1,
DB_COLLECTION set2,
int  do_coercion,
int  total_order 
)

Definition at line 3464 of file set_object.c.

References DB_UNK, error(), NO_ERROR, NULL, db_set::owner, set_get_setobj(), setobj_compare_order(), and ws_pin().

Referenced by mr_cmpval_sequence().

Here is the caller graph for this function:

int set_size ( DB_COLLECTION set)

Definition at line 3036 of file set_object.c.

References error(), NO_ERROR, NULL, set_get_setobj(), setobj_size(), and ws_pin().

Referenced by add_grant_entry(), apply_grants(), au_dump_user(), au_force_write_new_auth(), au_print_auth(), build_class_grant_list(), catcls_expand_or_value_by_subset(), catcls_get_or_value_from_attribute(), catcls_get_or_value_from_indexes(), catcls_get_property_set(), classobj_cache_constraint_entry(), classobj_cache_constraint_list(), classobj_change_constraint_comment(), classobj_change_constraint_status(), classobj_check_function_constraint_info(), classobj_drop_foreign_key_ref(), classobj_drop_prop(), classobj_get_prop(), classobj_make_class_constraints(), classobj_make_foreign_key_ref_list(), classobj_make_index_filter_pred_info(), classobj_make_index_prefix_info(), classobj_print_props(), classobj_put_foreign_key_ref(), classobj_put_prop(), collect_class_grants(), db_col_size(), db_seq_size(), db_set_size(), object_printer::describe_partition_parts(), db_value_printer::describe_set(), disk_to_attribute(), drop_grant_entry(), emit_partition_parts(), eval_item_card_set(), eval_pred(), eval_pred_alsm4(), eval_pred_comp2(), eval_some_eval(), eval_sub_multi_set_to_sort_list(), fetch_set_internal(), fill_collection(), find_all_triggers(), find_grant_entry(), fprint_special_set(), get_grants(), get_property_list(), get_user_trigger_objects(), jsp_get_value_size(), jsp_pack_set_argument(), mht_valhash(), obt_convert_set_templates(), obt_final_check_set(), obt_free_assignment(), or_cl_get_prop_nocopy(), or_get_constraint_comment(), or_get_current_representation(), or_install_btids(), or_install_btids_class(), or_install_btids_constraint(), or_install_btids_foreign_key_ref(), or_install_btids_prefix_length(), or_packed_set_length(), or_put_set(), print_set(), propagate_revoke(), property_list_size(), pt_check_alter_partition(), pt_coerce_node_collation(), put_property_list(), tr_dump_selective_triggers(), tr_status_as_string(), tr_update_user_cache(), trigger_table_add(), trigger_table_drop(), trigger_table_find(), trigger_table_rename(), valcnv_convert_set_to_string(), and vid_fetch_instance().

int set_tform_disk_set ( DB_COLLECTION ref,
COL **  setptr 
)

Definition at line 2123 of file set_object.c.

References assert, db_private_free_and_init, db_set::disk_domain, db_set::disk_set, db_set::disk_size, er_errid(), db_set::need_clear, NO_ERROR, NULL, or_get_set(), or_init(), and db_set::set.

Referenced by set_get_setobj().

Here is the caller graph for this function:

int set_union ( DB_COLLECTION collection1,
DB_COLLECTION collection2,
DB_COLLECTION **  result,
DB_DOMAIN domain 
)

Definition at line 3928 of file set_object.c.

References set_op(), and setobj_union().

Referenced by pt_union_sets(), and qdata_add_sequence_to_dbval().

Here is the caller graph for this function:

int setobj_add_element ( COL col,
DB_VALUE value 
)

Definition at line 5788 of file set_object.c.

References assign_set_value(), CHECKNULL_ERR, col_add(), db_make_null(), error(), IMPLICIT, NO_ERROR, pr_clear_value(), and SET_DUPLICATE_VALUE.

Referenced by set_add_element(), setobj_difference(), setobj_intersection(), and setobj_union().

Here is the caller graph for this function:

int setobj_build_domain_from_col ( COL col,
TP_DOMAIN **  set_domain 
)

Definition at line 6315 of file set_object.c.

References setobj::domain, i, INDEX, NO_ERROR, NULL, setobj::size, tp_domain_add(), tp_domain_copy(), and tp_domain_resolve_value().

Referenced by tp_domain_resolve_value().

Here is the caller graph for this function:

int setobj_cardinality ( COL col)

Definition at line 4970 of file set_object.c.

References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), error(), NULL, and setobj_filter().

Referenced by set_cardinality().

Here is the caller graph for this function:

TP_DOMAIN_STATUS setobj_check_domain ( COL col,
TP_DOMAIN domain 
)

Definition at line 4570 of file set_object.c.

References setobj::domain, DOMAIN_COMPATIBLE, i, INDEX, NULL, tp_domain::setdomain, setobj::size, tp_domain_check(), tp_domain_compatible(), and TP_EXACT_MATCH.

Referenced by set_check_domain().

Here is the caller graph for this function:

void setobj_clear ( COL col)

Definition at line 4307 of file set_object.c.

References setobj::array, i, INDEX, NULL, pr_clear_value(), set_free_block(), setobj::size, setobj::topblock, and setobj::topblockcount.

Referenced by set_copy(), and setobj_free().

Here is the caller graph for this function:

COL* setobj_coerce ( COL col,
TP_DOMAIN domain,
bool  implicit_coercion 
)
DB_VALUE_COMPARE_RESULT setobj_compare ( COL set1,
COL set2,
int  do_coercion 
)

Definition at line 5109 of file set_object.c.

References assert_release, DB_EQ, DB_GT, DB_LT, DB_NE, DB_SUBSET, DB_SUPERSET, DB_UNK, error(), INDEX, NO_ERROR, NULL, rc, setobj_sort(), setobj::size, setobj::sorted, and tp_value_compare().

Referenced by set_compare().

Here is the caller graph for this function:

DB_VALUE_COMPARE_RESULT setobj_compare_order ( COL set1,
COL set2,
int  do_coercion,
int  total_order 
)

Definition at line 5228 of file set_object.c.

References col_has_null(), DB_EQ, DB_GT, DB_LT, DB_UNK, error(), i, INDEX, NO_ERROR, rc, setobj_sort(), setobj::size, setobj::sorted, and tp_value_compare().

Referenced by mr_data_cmpdisk_sequence(), mr_data_cmpdisk_set(), set_compare_order(), and set_seq_compare().

Here is the caller graph for this function:

COL* setobj_copy ( COL col)
COL* setobj_create ( DB_TYPE  collection_type,
int  size 
)

Definition at line 4289 of file set_object.c.

References ARG_FILE_LINE, col_new(), DB_TYPE_VOBJ, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), NULL, and TP_IS_SET_TYPE.

Referenced by or_get_set(), set_create(), and setobj_create_with_domain().

Here is the caller graph for this function:

COL* setobj_create_with_domain ( TP_DOMAIN domain,
int  initial_size 
)

Definition at line 4268 of file set_object.c.

References setobj::domain, NULL, setobj_create(), and TP_DOMAIN_TYPE.

Referenced by set_create_with_domain(), and setobj_coerce().

Here is the caller graph for this function:

int setobj_difference ( COL set1,
COL set2,
COL result 
)

Definition at line 5294 of file set_object.c.

References DB_EQ, DB_GT, DB_IS_NULL, DB_LT, DB_UNK, error(), INDEX, NO_ERROR, rc, setobj_add_element(), setobj_sort(), setobj::sorted, and tp_value_compare().

Referenced by set_difference(), and set_op().

Here is the caller graph for this function:

TP_DOMAIN* setobj_domain ( COL set)

Definition at line 6175 of file set_object.c.

References NULL.

Referenced by or_get_set(), or_packed_set_length(), or_put_set(), and tp_value_cast_internal().

Here is the caller graph for this function:

int setobj_drop_element ( COL col,
DB_VALUE value,
bool  match_nulls 
)

Definition at line 5923 of file set_object.c.

References CHECKNULL_ERR, col_drop(), col_drop_nulls(), DB_IS_NULL, error(), and NO_ERROR.

Referenced by set_drop_element().

Here is the caller graph for this function:

int setobj_drop_seq_element ( COL col,
int  index 
)

Definition at line 5958 of file set_object.c.

References ARG_FILE_LINE, CHECKNULL_ERR, col_delete(), er_set(), ER_SET_INVALID_INDEX, ER_WARNING_SEVERITY, error(), NO_ERROR, and setobj::size.

Referenced by set_drop_seq_element().

Here is the caller graph for this function:

int setobj_filter ( COL col,
int  filter,
int *  cardptr 
)

Definition at line 4874 of file set_object.c.

References check_set_object(), col_delete(), setobj::coltype, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, db_value_is_null(), DB_VALUE_TYPE, error(), i, INDEX, NO_ERROR, NULL, setobj::size, and swizzle_value().

Referenced by set_filter(), and setobj_cardinality().

Here is the caller graph for this function:

int setobj_find_seq_element ( COL col,
DB_VALUE value,
int  index 
)

Definition at line 5996 of file set_object.c.

References ARG_FILE_LINE, ER_SEQ_ELEMENT_NOT_FOUND, ER_SEQ_OUT_OF_BOUNDS, er_set(), ER_WARNING_SEVERITY, INDEX, setobj::size, and tp_value_equal().

Referenced by set_find_seq_element().

Here is the caller graph for this function:

int setobj_get_element ( COL set,
int  index,
DB_VALUE value 
)
int setobj_get_element_ptr ( COL col,
int  index,
DB_VALUE **  result 
)
DB_COLLECTION* setobj_get_reference ( COL set)
int setobj_insert_element ( COL col,
int  index,
DB_VALUE value 
)

Definition at line 5879 of file set_object.c.

References ARG_FILE_LINE, assign_set_value(), CHECKNULL_ERR, col_insert(), er_set(), ER_SET_INVALID_INDEX, ER_WARNING_SEVERITY, error(), IMPLICIT, and NO_ERROR.

Referenced by set_insert_element().

Here is the caller graph for this function:

int setobj_intersection ( COL set1,
COL set2,
COL result 
)

Definition at line 5485 of file set_object.c.

References DB_EQ, DB_GT, DB_IS_NULL, DB_LT, DB_UNK, error(), INDEX, NO_ERROR, rc, setobj_add_element(), setobj_sort(), setobj::sorted, and tp_value_compare().

Referenced by set_intersection().

Here is the caller graph for this function:

bool setobj_isempty ( COL col)

Definition at line 4996 of file set_object.c.

References setobj_size().

Referenced by set_isempty().

Here is the caller graph for this function:

bool setobj_ismember ( COL col,
DB_VALUE proposed_value,
int  check_null 
)
int setobj_issome ( DB_VALUE value,
COL set,
PT_OP_TYPE  op,
int  do_coercion 
)

Definition at line 5568 of file set_object.c.

References col_has_null(), DB_EQ, DB_GT, DB_IS_NULL, DB_LT, DB_UNK, i, INDEX, PT_EQ_SOME, PT_GE_SOME, PT_GT_SOME, PT_LE_SOME, PT_LT_SOME, PT_NE_SOME, and tp_value_compare().

Referenced by set_issome().

Here is the caller graph for this function:

void setobj_print ( FILE *  fp,
COL col 
)

Definition at line 6118 of file set_object.c.

References setobj::coltype, db_fprint_value(), DB_TYPE_MULTISET, DB_TYPE_SET, i, INDEX, NULL, and setobj::size.

Referenced by col_debug(), and set_fprint().

Here is the caller graph for this function:

void setobj_put_domain ( COL set,
TP_DOMAIN domain 
)

Definition at line 6193 of file set_object.c.

Referenced by or_get_set(), qdata_convert_dbvals_to_set(), qdata_convert_table_to_set(), and tp_value_cast_internal().

Here is the caller graph for this function:

int setobj_put_element ( COL col,
int  index,
DB_VALUE value 
)

Definition at line 5830 of file set_object.c.

References ARG_FILE_LINE, assign_set_value(), CHECKNULL_ERR, col_put(), db_make_null(), er_set(), ER_SET_INVALID_INDEX, ER_WARNING_SEVERITY, error(), IMPLICIT, INDEX, NO_ERROR, and pr_clear_value().

Referenced by set_put_element().

Here is the caller graph for this function:

int setobj_put_value ( COL col,
int  index,
DB_VALUE value 
)

Definition at line 6211 of file set_object.c.

References col_add(), col_put(), setobj::coltype, DB_TYPE_MULTISET, DB_TYPE_SET, error(), NO_ERROR, and PRIM_SET_NULL().

Referenced by or_get_set(), qdata_convert_dbvals_to_set(), and qdata_convert_table_to_set().

Here is the caller graph for this function:

int setobj_release ( COL set)

Definition at line 6289 of file set_object.c.

References error(), NO_ERROR, NULL, set_disconnect(), and setobj_free().

Referenced by mr_setmem_set().

Here is the caller graph for this function:

int setobj_union ( COL set1,
COL set2,
COL result 
)

Definition at line 5382 of file set_object.c.

References setobj::coltype, DB_EQ, DB_GT, DB_IS_NULL, DB_LT, DB_TYPE_SEQUENCE, DB_UNK, error(), INDEX, NO_ERROR, rc, setobj_add_element(), setobj_sort(), setobj::size, setobj::sorted, and tp_value_compare().

Referenced by set_union().

Here is the caller graph for this function:

DB_VALUE_COMPARE_RESULT setvobj_compare ( COL set1,
COL set2,
int  do_coercion,
int  total_order 
)
DB_VALUE_COMPARE_RESULT vobj_compare ( DB_COLLECTION set1,
DB_COLLECTION set2,
int  do_coercion,
int  total_order 
)

Definition at line 3517 of file set_object.c.

References DB_UNK, error(), NO_ERROR, NULL, db_set::owner, set_get_setobj(), setvobj_compare(), and ws_pin().

Referenced by mr_cmpval_vobj().

Here is the caller graph for this function: