CUBRID Engine  latest
class_object.c File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "language_support.h"
#include "area_alloc.h"
#include "work_space.h"
#include "object_representation.h"
#include "object_primitive.h"
#include "class_object.h"
#include "boot_cl.h"
#include "locator_cl.h"
#include "authenticate.h"
#include "set_object.h"
#include "object_accessor.h"
#include "object_print.h"
#include "parser.h"
#include "trigger_manager.h"
#include "schema_manager.h"
#include "dbi.h"
#include "dbtype.h"
#include "printer.hpp"

Go to the source code of this file.

Macros

#define SM_SPRINTF_UNIQUE_PROPERTY_VALUE(buffer, volid, fileid, pageid)   sprintf(buffer, "%d|%d|%d", (int)volid, (int)fileid, (int)pageid)
 
#define NUM_CONSTRAINT_TYPES   ((int)(sizeof(Constraint_types)/sizeof(Constraint_types[0])))
 
#define NUM_CONSTRAINT_PROPERTIES   ((int)(sizeof(Constraint_properties)/sizeof(Constraint_properties[0])))
 

Enumerations

enum  SM_CONSTRAINT_COMPATIBILITY { SM_CREATE_NEW_INDEX = 0, SM_SHARE_INDEX = 1, SM_NOT_SHARE_INDEX_AND_WARNING = 2, SM_NOT_SHARE_PRIMARY_KEY_AND_WARNING = 3 }
 

Functions

static void classobj_print_props (DB_SEQ *properties)
 
static DB_SEQclassobj_make_foreign_key_info_seq (SM_FOREIGN_KEY_INFO *fk_info)
 
static DB_SEQclassobj_make_foreign_key_ref_seq (SM_FOREIGN_KEY_INFO *fk_info)
 
static DB_SEQclassobj_make_index_attr_prefix_seq (int num_attrs, const int *attrs_prefix_length)
 
static DB_SEQclassobj_make_index_filter_pred_seq (SM_PREDICATE_INFO *filter_index_info)
 
static void classobj_put_value_and_iterate (DB_SEQ *destination, int &index, DB_VALUE &value)
 
static int classobj_put_seq_and_iterate (DB_SEQ *destination, int &index, DB_SEQ *element)
 
static int classobj_put_seq_with_name_and_iterate (DB_SEQ *destination, int &index, const char *name, DB_SEQ *seq)
 
static SM_CONSTRAINTclassobj_make_constraint (const char *name, SM_CONSTRAINT_TYPE type, BTID *id, bool has_function_constraint)
 
static void classobj_free_constraint (SM_CONSTRAINT *constraint)
 
static int classobj_constraint_size (SM_CONSTRAINT *constraint)
 
static bool classobj_cache_constraint_entry (const char *name, DB_SEQ *constraint_seq, SM_CLASS *class_, SM_CONSTRAINT_TYPE constraint_type)
 
static bool classobj_cache_constraint_list (DB_SEQ *seq, SM_CLASS *class_, SM_CONSTRAINT_TYPE constraint_type)
 
static SM_CLASS_CONSTRAINTclassobj_make_class_constraint (const char *name, SM_CONSTRAINT_TYPE type)
 
static SM_FOREIGN_KEY_INFOclassobj_make_foreign_key_info (DB_SEQ *fk_seq, const char *cons_name, SM_ATTRIBUTE *attributes)
 
static SM_FOREIGN_KEY_INFOclassobj_make_foreign_key_ref (DB_SEQ *fk_seq)
 
static SM_FOREIGN_KEY_INFOclassobj_make_foreign_key_ref_list (DB_SEQ *fk_container)
 
static int * classobj_make_index_prefix_info (DB_SEQ *prefix_seq, int num_attrs)
 
static SM_PREDICATE_INFOclassobj_make_index_filter_pred_info (DB_SEQ *pred_seq)
 
static int classobj_cache_not_null_constraints (const char *class_name, SM_ATTRIBUTE *attributes, SM_CLASS_CONSTRAINT **con_ptr)
 
static bool classobj_is_possible_constraint (SM_CONSTRAINT_TYPE existed, DB_CONSTRAINT_TYPE new_)
 
static int classobj_domain_size (TP_DOMAIN *domain)
 
static void classobj_filter_attribute_props (DB_SEQ *props)
 
static int classobj_init_attribute (SM_ATTRIBUTE *src, SM_ATTRIBUTE *dest, int copy)
 
static void classobj_clear_attribute_value (DB_VALUE *value)
 
static void classobj_clear_attribute (SM_ATTRIBUTE *att)
 
static int classobj_attribute_size (SM_ATTRIBUTE *att)
 
static void classobj_free_method_arg (SM_METHOD_ARGUMENT *arg)
 
static SM_METHOD_ARGUMENTclassobj_copy_method_arg (SM_METHOD_ARGUMENT *src)
 
static int classobj_method_arg_size (SM_METHOD_ARGUMENT *arg)
 
static SM_METHOD_SIGNATUREclassobj_copy_method_signature (SM_METHOD_SIGNATURE *sig)
 
static int classobj_method_signature_size (SM_METHOD_SIGNATURE *sig)
 
static void classobj_clear_method (SM_METHOD *meth)
 
static int classobj_init_method (SM_METHOD *src, SM_METHOD *dest, int copy)
 
static int classobj_copy_methlist (SM_METHOD *methlist, MOP filter_class, SM_METHOD **copy_ptr)
 
static int classobj_method_size (SM_METHOD *meth)
 
static int classobj_resolution_size (SM_RESOLUTION *res)
 
static SM_METHOD_FILEclassobj_copy_methfile (SM_METHOD_FILE *src)
 
static int classobj_method_file_size (SM_METHOD_FILE *file)
 
static void classobj_free_repattribute (SM_REPR_ATTRIBUTE *rat)
 
static int classobj_repattribute_size (void)
 
static int classobj_representation_size (SM_REPRESENTATION *rep)
 
static int classobj_query_spec_size (SM_QUERY_SPEC *query_spec)
 
static void classobj_insert_ordered_attribute (SM_ATTRIBUTE **attlist, SM_ATTRIBUTE *att)
 
static SM_REPRESENTATIONclassobj_capture_representation (SM_CLASS *class_)
 
static void classobj_sort_attlist (SM_ATTRIBUTE **source)
 
static void classobj_sort_methlist (SM_METHOD **source)
 
static int classobj_copy_attribute_like (DB_CTMPL *ctemplate, SM_ATTRIBUTE *attribute, const char *const like_class_name)
 
static int classobj_copy_constraint_like (DB_CTMPL *ctemplate, SM_CLASS_CONSTRAINT *constraint, const char *const like_class_name)
 
static SM_FUNCTION_INFOclassobj_make_function_index_info (DB_SEQ *func_seq)
 
static DB_SEQclassobj_make_function_index_info_seq (SM_FUNCTION_INFO *func_index_info)
 
static SM_CONSTRAINT_COMPATIBILITY classobj_check_index_compatibility (SM_CLASS_CONSTRAINT *constraints, const DB_CONSTRAINT_TYPE constraint_type, const SM_PREDICATE_INFO *filter_predicate, const SM_FUNCTION_INFO *func_index_info, const SM_CLASS_CONSTRAINT *existing_con, SM_CLASS_CONSTRAINT **primary_con)
 
static int classobj_check_function_constraint_info (DB_SEQ *constraint_seq, bool *has_function_constraint)
 
static int classobj_partition_info_size (SM_PARTITION *partition_info)
 
int classobj_area_init (void)
 
void classobj_area_final (void)
 
DB_LISTclassobj_alloc_threaded_array (int size, int count)
 
void classobj_free_threaded_array (DB_LIST *array, LFREEER clear)
 
DB_SEQclassobj_make_prop ()
 
void classobj_free_prop (DB_SEQ *properties)
 
int classobj_put_prop (DB_SEQ *properties, const char *name, DB_VALUE *pvalue)
 
int classobj_drop_prop (DB_SEQ *properties, const char *name)
 
const char * classobj_map_constraint_to_property (SM_CONSTRAINT_TYPE constraint)
 
int classobj_copy_props (DB_SEQ *properties, MOP filter_class, DB_SEQ **new_properties)
 
char * classobj_describe_foreign_key_action (SM_FOREIGN_KEY_ACTION action)
 
int classobj_put_index (DB_SEQ **properties, SM_CONSTRAINT_TYPE type, const char *constraint_name, SM_ATTRIBUTE **atts, const int *asc_desc, const int *attr_prefix_length, const BTID *id, SM_PREDICATE_INFO *filter_index_info, SM_FOREIGN_KEY_INFO *fk_info, char *shared_cons_name, SM_FUNCTION_INFO *func_index_info, const char *comment, SM_INDEX_STATUS index_status, bool attr_name_instead_of_id)
 
bool classobj_is_exist_foreign_key_ref (MOP refop, SM_FOREIGN_KEY_INFO *fk_info)
 
bool classobj_is_pk_referred (MOP clsop, SM_FOREIGN_KEY_INFO *fk_info, bool include_self_ref, char **fk_name)
 
int classobj_put_foreign_key_ref (DB_SEQ **properties, SM_FOREIGN_KEY_INFO *fk_info)
 
int classobj_drop_foreign_key_ref (DB_SEQ **properties, const BTID *btid, const char *name)
 
int classobj_find_prop_constraint (DB_SEQ *properties, const char *prop_name, const char *cnstr_name, DB_VALUE *cnstr_val)
 
int classobj_change_constraint_comment (DB_SEQ *properties, SM_CLASS_CONSTRAINT *cons, const char *comment)
 
int classobj_btid_from_property_value (DB_VALUE *value, BTID *btid, char **shared_cons_name)
 
int classobj_oid_from_property_value (DB_VALUE *value, OID *oid)
 
int classobj_get_cached_constraint (SM_CONSTRAINT *constraints, SM_CONSTRAINT_TYPE type, BTID *id)
 
bool classobj_has_class_unique_constraint (SM_CLASS_CONSTRAINT *constraints)
 
bool classobj_has_unique_constraint (SM_CONSTRAINT *constraints)
 
bool classobj_has_function_constraint (SM_CONSTRAINT *constraints)
 
bool classobj_cache_constraints (SM_CLASS *class_)
 
SM_ATTRIBUTEclassobj_find_attribute_list (SM_ATTRIBUTE *attlist, const char *name, int id)
 
void classobj_free_foreign_key_ref (SM_FOREIGN_KEY_INFO *fk_info)
 
void classobj_free_class_constraints (SM_CLASS_CONSTRAINT *constraints)
 
int classobj_make_class_constraints (DB_SET *class_props, SM_ATTRIBUTE *attributes, SM_CLASS_CONSTRAINT **con_ptr)
 
void classobj_decache_class_constraints (SM_CLASS *class_)
 
int classobj_cache_class_constraints (SM_CLASS *class_)
 
SM_CLASS_CONSTRAINTclassobj_find_class_constraint (SM_CLASS_CONSTRAINT *constraints, SM_CONSTRAINT_TYPE type, const char *name)
 
SM_CLASS_CONSTRAINTclassobj_find_class_constraint_by_btid (SM_CLASS_CONSTRAINT *constraints, SM_CONSTRAINT_TYPE type, BTID btid)
 
SM_CLASS_CONSTRAINTclassobj_find_constraint_by_name (SM_CLASS_CONSTRAINT *cons_list, const char *name)
 
SM_CLASS_CONSTRAINTclassobj_find_class_index (SM_CLASS *class_, const char *name)
 
SM_CLASS_CONSTRAINTclassobj_find_cons_primary_key (SM_CLASS_CONSTRAINT *cons_list)
 
SM_CLASS_CONSTRAINTclassobj_find_class_primary_key (SM_CLASS *class_)
 
TP_DOMAINclassobj_find_cons_index2_col_type_list (SM_CLASS_CONSTRAINT *cons, OID *root_oid)
 
SM_CLASS_CONSTRAINTclassobj_find_constraint_by_attrs (SM_CLASS_CONSTRAINT *cons_list, DB_CONSTRAINT_TYPE new_cons, const char **att_names, const int *asc_desc)
 
void classobj_remove_class_constraint_node (SM_CLASS_CONSTRAINT **constraints, SM_CLASS_CONSTRAINT *node)
 
int classobj_populate_class_properties (DB_SET **properties, SM_CLASS_CONSTRAINT *constraints, SM_CONSTRAINT_TYPE type)
 
bool classobj_class_has_indexes (SM_CLASS *class_)
 
SM_ATTRIBUTEclassobj_make_attribute (const char *name, struct pr_type *type, SM_NAME_SPACE name_space)
 
void classobj_initialize_attributes (SM_ATTRIBUTE *attributes)
 
void classobj_initialize_methods (SM_METHOD *methods)
 
SM_ATTRIBUTEclassobj_copy_attribute (SM_ATTRIBUTE *src, const char *alias)
 
int classobj_copy_attlist (SM_ATTRIBUTE *attlist, MOP filter_class, int ordered, SM_ATTRIBUTE **copy_ptr)
 
void classobj_free_attribute (SM_ATTRIBUTE *att)
 
SM_METHOD_ARGUMENTclassobj_make_method_arg (int index)
 
SM_METHOD_ARGUMENTclassobj_find_method_arg (SM_METHOD_ARGUMENT **arglist, int index, int create)
 
SM_METHOD_SIGNATUREclassobj_make_method_signature (const char *name)
 
void classobj_free_method_signature (SM_METHOD_SIGNATURE *sig)
 
SM_METHODclassobj_make_method (const char *name, SM_NAME_SPACE name_space)
 
SM_METHODclassobj_copy_method (SM_METHOD *src, const char *alias)
 
void classobj_free_method (SM_METHOD *meth)
 
void classobj_free_resolution (SM_RESOLUTION *res)
 
SM_RESOLUTIONclassobj_make_resolution (MOP class_mop, const char *name, const char *alias, SM_NAME_SPACE name_space)
 
int classobj_copy_reslist (SM_RESOLUTION *src, SM_NAME_SPACE resspace, SM_RESOLUTION **copy_ptr)
 
SM_RESOLUTIONclassobj_find_resolution (SM_RESOLUTION *reslist, MOP class_mop, const char *name, SM_NAME_SPACE name_space)
 
void classobj_free_method_file (SM_METHOD_FILE *file)
 
SM_METHOD_FILEclassobj_make_method_file (const char *name)
 
int classobj_copy_methfiles (SM_METHOD_FILE *files, MOP filter_class, SM_METHOD_FILE **copy_ptr)
 
SM_REPR_ATTRIBUTEclassobj_make_repattribute (int attid, DB_TYPE type_id, TP_DOMAIN *domain)
 
SM_REPRESENTATIONclassobj_make_representation ()
 
void classobj_free_representation (SM_REPRESENTATION *rep)
 
SM_QUERY_SPECclassobj_make_query_spec (const char *specification)
 
SM_QUERY_SPECclassobj_copy_query_spec_list (SM_QUERY_SPEC *query_spec)
 
void classobj_free_query_spec (SM_QUERY_SPEC *query_spec)
 
void classobj_free_template (SM_TEMPLATE *template_ptr)
 
SM_TEMPLATEclassobj_make_template (const char *name, MOP op, SM_CLASS *class_)
 
SM_TEMPLATEclassobj_make_template_like (const char *name, SM_CLASS *class_)
 
const char ** classobj_point_at_att_names (SM_CLASS_CONSTRAINT *constraint, int *count_ref)
 
SM_CLASSclassobj_make_class (const char *name)
 
void classobj_free_class (SM_CLASS *class_)
 
int classobj_class_size (SM_CLASS *class_)
 
void classobj_fixup_loaded_class (SM_CLASS *class_)
 
int classobj_install_template (SM_CLASS *class_, SM_TEMPLATE *flat, int saverep)
 
SM_REPRESENTATIONclassobj_find_representation (SM_CLASS *class_, int id)
 
SM_COMPONENTclassobj_filter_components (SM_COMPONENT **complist, SM_NAME_SPACE name_space)
 
SM_ATTRIBUTEclassobj_find_attribute (SM_CLASS *class_, const char *name, int class_attribute)
 
SM_ATTRIBUTEclassobj_find_attribute_id (SM_CLASS *class_, int id, int class_attribute)
 
SM_METHODclassobj_find_method (SM_CLASS *class_, const char *name, int class_method)
 
SM_COMPONENTclassobj_find_component (SM_CLASS *class_, const char *name, int class_component)
 
SM_COMPONENTclassobj_complist_search (SM_COMPONENT *list, const char *name)
 
SM_DESCRIPTOR_LISTclassobj_make_desclist (MOP classobj, SM_CLASS *class_, SM_COMPONENT *comp, int write_access)
 
void classobj_free_desclist (SM_DESCRIPTOR_LIST *dl)
 
void classobj_free_descriptor (SM_DESCRIPTOR *desc)
 
SM_DESCRIPTORclassobj_make_descriptor (MOP class_mop, SM_CLASS *classobj, SM_COMPONENT *comp, int write_access)
 
int classobj_check_index_exist (SM_CLASS_CONSTRAINT *constraints, char **out_shared_cons_name, const char *class_name, DB_CONSTRAINT_TYPE constraint_type, const char *constraint_name, const char **att_names, const int *asc_desc, const SM_PREDICATE_INFO *filter_index, const SM_FUNCTION_INFO *func_index_info)
 
void classobj_free_function_index_ref (SM_FUNCTION_INFO *func_index_info)
 
SM_PARTITIONclassobj_make_partition_info (void)
 
void classobj_free_partition_info (SM_PARTITION *partition_info)
 
SM_PARTITIONclassobj_copy_partition_info (SM_PARTITION *partition_info)
 
int classobj_copy_default_expr (DB_DEFAULT_EXPR *dest, const DB_DEFAULT_EXPR *src)
 
int classobj_change_constraint_status (DB_SEQ *properties, SM_CLASS_CONSTRAINT *cons, SM_INDEX_STATUS index_status)
 

Variables

const int SM_MAX_STRING_LENGTH = 1073741823
 
static SM_CONSTRAINT_TYPE Constraint_types []
 
static const char * Constraint_properties []
 
static AREATemplate_area = NULL
 

Macro Definition Documentation

#define NUM_CONSTRAINT_PROPERTIES   ((int)(sizeof(Constraint_properties)/sizeof(Constraint_properties[0])))

Definition at line 91 of file class_object.c.

#define NUM_CONSTRAINT_TYPES   ((int)(sizeof(Constraint_types)/sizeof(Constraint_types[0])))

Definition at line 89 of file class_object.c.

Referenced by classobj_cache_constraints(), and classobj_make_class_constraints().

#define SM_SPRINTF_UNIQUE_PROPERTY_VALUE (   buffer,
  volid,
  fileid,
  pageid 
)    sprintf(buffer, "%d|%d|%d", (int)volid, (int)fileid, (int)pageid)

Definition at line 58 of file class_object.c.

Enumeration Type Documentation

Enumerator
SM_CREATE_NEW_INDEX 
SM_SHARE_INDEX 
SM_NOT_SHARE_INDEX_AND_WARNING 
SM_NOT_SHARE_PRIMARY_KEY_AND_WARNING 

Definition at line 61 of file class_object.c.

Function Documentation

DB_LIST* classobj_alloc_threaded_array ( int  size,
int  count 
)

Definition at line 211 of file class_object.c.

References db_ws_alloc(), i, db_list::next, and NULL.

Referenced by classobj_install_template(), and disk_to_class().

Here is the caller graph for this function:

void classobj_area_final ( void  )

Definition at line 184 of file class_object.c.

References area_destroy(), and NULL.

Referenced by ws_init().

Here is the caller graph for this function:

int classobj_area_init ( void  )

Definition at line 167 of file class_object.c.

References area_create(), assert, er_errid(), NO_ERROR, and NULL.

Referenced by ws_init().

Here is the caller graph for this function:

static bool classobj_cache_constraint_list ( DB_SEQ seq,
SM_CLASS class_,
SM_CONSTRAINT_TYPE  constraint_type 
)
static
static int classobj_check_function_constraint_info ( DB_SEQ constraint_seq,
bool has_function_constraint 
)
static
int classobj_check_index_exist ( SM_CLASS_CONSTRAINT constraints,
char **  out_shared_cons_name,
const char *  class_name,
DB_CONSTRAINT_TYPE  constraint_type,
const char *  constraint_name,
const char **  att_names,
const int *  asc_desc,
const SM_PREDICATE_INFO filter_index,
const SM_FUNCTION_INFO func_index_info 
)
bool classobj_class_has_indexes ( SM_CLASS class_)

Definition at line 4212 of file class_object.c.

References sm_class::constraints, sm_class_constraint::next, NULL, SM_IS_CONSTRAINT_INDEX_FAMILY, and sm_class_constraint::type.

Referenced by desc_obj_to_disk(), la_repl_add_object(), and tf_mem_to_disk().

Here is the caller graph for this function:

static void classobj_clear_attribute_value ( DB_VALUE value)
static

Definition at line 4634 of file class_object.c.

References db_get_set(), DB_IS_NULL, DB_VALUE_TYPE, NULL, pr_clear_value(), db_set::set, set_free(), setobj_free(), and TP_IS_SET_TYPE.

Referenced by classobj_clear_attribute().

Here is the caller graph for this function:

static void classobj_clear_method ( SM_METHOD meth)
static
SM_COMPONENT* classobj_complist_search ( SM_COMPONENT list,
const char *  name 
)
static int classobj_constraint_size ( SM_CONSTRAINT constraint)
static

Definition at line 2310 of file class_object.c.

Referenced by classobj_attribute_size().

Here is the caller graph for this function:

int classobj_copy_attlist ( SM_ATTRIBUTE attlist,
MOP  filter_class,
int  ordered,
SM_ATTRIBUTE **  copy_ptr 
)
SM_ATTRIBUTE* classobj_copy_attribute ( SM_ATTRIBUTE src,
const char *  alias 
)
static SM_METHOD_FILE * classobj_copy_methfile ( SM_METHOD_FILE src)
static
int classobj_copy_methfiles ( SM_METHOD_FILE files,
MOP  filter_class,
SM_METHOD_FILE **  copy_ptr 
)

Definition at line 5647 of file class_object.c.

References assert, sm_method_file::class_mop, classobj_copy_methfile(), er_errid(), sm_method_file::next, NO_ERROR, and NULL.

Referenced by classobj_make_template(), and flatten_method_files().

Here is the caller graph for this function:

static int classobj_copy_methlist ( SM_METHOD methlist,
MOP  filter_class,
SM_METHOD **  copy_ptr 
)
static

Definition at line 5277 of file class_object.c.

References assert, sm_method::class_mop, classobj_copy_method(), er_errid(), sm_method::header, sm_component::next, NO_ERROR, and NULL.

Referenced by classobj_make_template().

Here is the caller graph for this function:

SM_METHOD* classobj_copy_method ( SM_METHOD src,
const char *  alias 
)
static SM_METHOD_ARGUMENT * classobj_copy_method_arg ( SM_METHOD_ARGUMENT src)
static
SM_QUERY_SPEC* classobj_copy_query_spec_list ( SM_QUERY_SPEC query_spec)

Definition at line 5871 of file class_object.c.

References classobj_make_query_spec(), sm_query_spec::next, NULL, p, and sm_query_spec::specification.

Referenced by classobj_make_template(), and flatten_query_spec_lists().

Here is the caller graph for this function:

int classobj_copy_reslist ( SM_RESOLUTION src,
SM_NAME_SPACE  resspace,
SM_RESOLUTION **  copy_ptr 
)
void classobj_decache_class_constraints ( SM_CLASS class_)

Definition at line 3552 of file class_object.c.

References assert, classobj_free_class_constraints(), sm_class::constraints, sm_class::dont_decache_constraints_or_flush, and NULL.

Referenced by classobj_cache_class_constraints(), and sm_exist_index().

Here is the caller graph for this function:

char* classobj_describe_foreign_key_action ( SM_FOREIGN_KEY_ACTION  action)
static int classobj_domain_size ( TP_DOMAIN domain)
static

Definition at line 4240 of file class_object.c.

References tp_domain::setdomain, and ws_list_total().

Referenced by classobj_attribute_size(), and classobj_method_arg_size().

Here is the caller graph for this function:

static void classobj_filter_attribute_props ( DB_SEQ props)
static

Definition at line 4318 of file class_object.c.

References classobj_drop_prop(), SM_PROPERTY_INDEX, and SM_PROPERTY_REVERSE_INDEX.

Referenced by classobj_init_attribute().

Here is the caller graph for this function:

SM_ATTRIBUTE* classobj_find_attribute_id ( SM_CLASS class_,
int  id,
int  class_attribute 
)

Definition at line 7568 of file class_object.c.

References sm_class::attributes, sm_class::class_attributes, sm_attribute::header, sm_attribute::id, sm_component::next, NULL, and sm_class::shared.

Referenced by classobj_cache_constraint_entry(), and sm_get_att_name().

Here is the caller graph for this function:

SM_ATTRIBUTE* classobj_find_attribute_list ( SM_ATTRIBUTE attlist,
const char *  name,
int  id 
)

Definition at line 2569 of file class_object.c.

References sm_attribute::header, sm_attribute::id, intl_identifier_casecmp(), sm_component::name, sm_component::next, and NULL.

Referenced by classobj_make_class_constraints(), and retain_former_ids().

Here is the caller graph for this function:

SM_CLASS_CONSTRAINT* classobj_find_class_constraint_by_btid ( SM_CLASS_CONSTRAINT constraints,
SM_CONSTRAINT_TYPE  type,
BTID  btid 
)

Definition at line 3763 of file class_object.c.

References BTID_IS_EQUAL, sm_class_constraint::index_btid, sm_class_constraint::next, NULL, and sm_class_constraint::type.

Referenced by transfer_disk_structures().

Here is the caller graph for this function:

SM_COMPONENT* classobj_find_component ( SM_CLASS class_,
const char *  name,
int  class_component 
)
SM_CLASS_CONSTRAINT* classobj_find_constraint_by_attrs ( SM_CLASS_CONSTRAINT cons_list,
DB_CONSTRAINT_TYPE  new_cons,
const char **  att_names,
const int *  asc_desc 
)
SM_METHOD_ARGUMENT* classobj_find_method_arg ( SM_METHOD_ARGUMENT **  arglist,
int  index,
int  create 
)

Definition at line 4896 of file class_object.c.

References classobj_make_method_arg(), sm_method_argument::index, sm_method_argument::next, and NULL.

Referenced by find_argument(), and ldr_act_add_argument().

Here is the caller graph for this function:

int classobj_find_prop_constraint ( DB_SEQ properties,
const char *  prop_name,
const char *  cnstr_name,
DB_VALUE cnstr_val 
)
SM_REPRESENTATION* classobj_find_representation ( SM_CLASS class_,
int  id 
)

Definition at line 7347 of file class_object.c.

References sm_representation::id, sm_representation::next, NULL, and sm_class::representations.

Referenced by get_desc_old(), and get_old().

Here is the caller graph for this function:

SM_RESOLUTION* classobj_find_resolution ( SM_RESOLUTION reslist,
MOP  class_mop,
const char *  name,
SM_NAME_SPACE  name_space 
)

Definition at line 5508 of file class_object.c.

References sm_resolution::class_mop, ID_NULL, sm_resolution::name, sm_resolution::name_space, sm_resolution::next, and NULL.

Referenced by add_candidate(), check_invalid_resolutions(), and delete_resolution().

Here is the caller graph for this function:

void classobj_free_attribute ( SM_ATTRIBUTE att)
static void classobj_free_constraint ( SM_CONSTRAINT constraint)
static

Definition at line 2282 of file class_object.c.

References db_ws_free(), sm_constraint::name, sm_constraint::next, and NULL.

Referenced by classobj_cache_constraints(), classobj_clear_attribute(), and classobj_make_constraint().

Here is the caller graph for this function:

void classobj_free_desclist ( SM_DESCRIPTOR_LIST dl)

Definition at line 7756 of file class_object.c.

References sm_descriptor_list::classobj, free_and_init, sm_descriptor_list::next, and NULL.

Referenced by classobj_free_descriptor(), and sm_reset_descriptors().

Here is the caller graph for this function:

void classobj_free_descriptor ( SM_DESCRIPTOR desc)
void classobj_free_foreign_key_ref ( SM_FOREIGN_KEY_INFO fk_info)

Definition at line 2635 of file class_object.c.

References db_ws_free(), free_and_init, sm_foreign_key_info::name, sm_foreign_key_info::next, and p.

Referenced by classobj_free_class_constraints(), and classobj_make_foreign_key_ref_list().

Here is the caller graph for this function:

void classobj_free_function_index_ref ( SM_FUNCTION_INFO func_index_info)

Definition at line 8249 of file class_object.c.

References sm_function_info::expr_str, sm_function_info::expr_stream, sm_function_info::fi_domain, NULL, tp_domain_free(), and ws_free_string().

Referenced by classobj_free_class_constraints().

Here is the caller graph for this function:

void classobj_free_method ( SM_METHOD meth)

Definition at line 5321 of file class_object.c.

References classobj_clear_method(), db_ws_free(), and NULL.

Referenced by classobj_free_template(), make_component_from_candidate(), and smt_delete_any().

Here is the caller graph for this function:

static void classobj_free_method_arg ( SM_METHOD_ARGUMENT arg)
static

Definition at line 4819 of file class_object.c.

References db_ws_free(), sm_method_argument::domain, NULL, and tp_domain_free().

Referenced by classobj_copy_method_arg(), classobj_copy_method_signature(), and classobj_free_method_signature().

Here is the caller graph for this function:

void classobj_free_prop ( DB_SEQ properties)
void classobj_free_query_spec ( SM_QUERY_SPEC query_spec)
static void classobj_free_repattribute ( SM_REPR_ATTRIBUTE rat)
static

Definition at line 5744 of file class_object.c.

References db_ws_free(), and NULL.

Referenced by classobj_free_representation().

Here is the caller graph for this function:

void classobj_free_representation ( SM_REPRESENTATION rep)
void classobj_free_threaded_array ( DB_LIST array,
LFREEER  clear 
)

Definition at line 248 of file class_object.c.

References db_ws_free(), db_list::next, and NULL.

Referenced by classobj_install_template().

Here is the caller graph for this function:

int classobj_get_cached_constraint ( SM_CONSTRAINT constraints,
SM_CONSTRAINT_TYPE  type,
BTID id 
)

Definition at line 2147 of file class_object.c.

References sm_constraint::index, sm_constraint::next, NULL, and sm_constraint::type.

Referenced by find_unique(), obt_make_assignment(), pt_to_pred_expr(), and sm_att_constrained().

Here is the caller graph for this function:

bool classobj_has_class_unique_constraint ( SM_CLASS_CONSTRAINT constraints)

Definition at line 2178 of file class_object.c.

References sm_class_constraint::next, NULL, SM_IS_CONSTRAINT_UNIQUE_FAMILY, and sm_class_constraint::type.

Referenced by sm_class_has_unique_constraint().

Here is the caller graph for this function:

bool classobj_has_function_constraint ( SM_CONSTRAINT constraints)

Definition at line 2222 of file class_object.c.

References sm_constraint::has_function, sm_constraint::next, and NULL.

Referenced by obt_make_assignment().

Here is the caller graph for this function:

bool classobj_has_unique_constraint ( SM_CONSTRAINT constraints)

Definition at line 2200 of file class_object.c.

References sm_constraint::next, NULL, SM_IS_CONSTRAINT_UNIQUE_FAMILY, and sm_constraint::type.

Referenced by check_for_cons(), obj_set_att(), obt_make_assignment(), and sm_att_unique_constrained().

Here is the caller graph for this function:

void classobj_initialize_methods ( SM_METHOD methods)

Definition at line 4360 of file class_object.c.

References sm_method::function, sm_method::header, sm_component::name, sm_component::next, NULL, sm_method::properties, and sm_method::signatures.

Referenced by disk_to_class().

Here is the caller graph for this function:

static void classobj_insert_ordered_attribute ( SM_ATTRIBUTE **  attlist,
SM_ATTRIBUTE att 
)
static

Definition at line 6810 of file class_object.c.

References NULL, sm_attribute::order, and sm_attribute::order_link.

Referenced by classobj_fixup_loaded_class().

Here is the caller graph for this function:

int classobj_install_template ( SM_CLASS class_,
SM_TEMPLATE flat,
int  saverep 
)

Definition at line 7087 of file class_object.c.

References assert, sm_class::att_count, sm_class::attributes, sm_class::class_attribute_count, sm_class::class_attributes, sm_template::class_attributes, class_atts, sm_class::class_method_count, sm_class::class_methods, sm_template::class_methods, sm_template::class_resolutions, sm_class::class_type, sm_template::class_type, classobj_alloc_threaded_array(), classobj_cache_class_constraints(), classobj_cache_constraints(), classobj_capture_representation(), classobj_clear_attribute(), classobj_clear_method(), classobj_fixup_loaded_class(), classobj_free_method_file(), classobj_free_partition_info(), classobj_free_prop(), classobj_free_query_spec(), classobj_free_resolution(), classobj_free_threaded_array(), classobj_init_attribute(), classobj_init_method(), classobj_sort_attlist(), classobj_sort_methlist(), DB_ATT_ALIGN, sm_attribute::domain, sm_class::dont_decache_constraints_or_flush, er_errid(), sm_class::fixed_count, sm_class::fixed_size, sm_attribute::header, sm_method::header, i, sm_class::inheritance, sm_template::inheritance, sm_template::instance_attributes, sm_class::loader_commands, sm_template::loader_commands, sm_class::method_count, sm_class::method_files, sm_template::method_files, sm_class::methods, sm_template::methods, ml_free(), sm_component::next, sm_representation::next, NO_ERROR, NULL, sm_class::partition, sm_template::partition, sm_class::properties, sm_template::properties, sm_class::query_spec, sm_template::query_spec, sm_class::recache_constraints, sm_class::repid, sm_class::representations, sm_class::resolutions, sm_template::resolutions, sm_class::shared, sm_template::shared_attributes, sm_class::shared_count, tp_domain_disk_size(), tr_free_schema_cache(), sm_class::triggers, sm_template::triggers, tp_domain::type, sm_class::variable_count, pr_type::variable_p, ws_free_string(), ws_list_free(), ws_list_length(), and WS_LIST_NCONC.

Referenced by install_new_representation().

Here is the caller graph for this function:

bool classobj_is_pk_referred ( MOP  clsop,
SM_FOREIGN_KEY_INFO fk_info,
bool  include_self_ref,
char **  fk_name 
)
SM_CLASS* classobj_make_class ( const char *  name)

Definition at line 6571 of file class_object.c.

References sm_class::att_count, sm_class::att_ids, sm_class::attributes, sm_class::auth_cache, boot_User_volid, sm_class_header::ch_heap, sm_class_header::ch_name, sm_class_header::ch_obj_header, sm_class_header::ch_rep_dir, sm_class_header::ch_type, ws_object_header::chn, sm_class::class_attribute_count, sm_class::class_attributes, sm_class::class_method_count, sm_class::class_methods, sm_class::class_type, sm_class::collation_id, sm_class::comment, sm_class::constraints, db_ws_alloc(), db_ws_free(), sm_class::dont_decache_constraints_or_flush, sm_class::fixed_count, sm_class::fixed_size, sm_class::flags, sm_class::has_active_triggers, sm_class::header, HFID_SET_NULL, sm_class::inheritance, LANG_SYS_COLLATION, sm_class::loader_commands, sm_class::method_count, sm_class::method_files, sm_class::method_ids, sm_class::methods, sm_class::methods_loaded, sm_class::new_, NULL, NULL_CHN, sm_class::object_size, OID_SET_NULL, sm_class::ordered_attributes, sm_class::owner, sm_class::partition, sm_class::post_load_cleanup, sm_class::properties, sm_class::query_spec, sm_class::recache_constraints, sm_class::repid, sm_class::representations, sm_class::resolutions, sm_class::shared, sm_class::shared_count, SM_CLASS_CT, SM_META_CLASS, sm_class::stats, sm_class::tde_algorithm, TDE_ALGORITHM_NONE, sm_class::triggers, sm_class::triggers_validated, sm_class::users, sm_class::variable_count, hfid::vfid, sm_class::virtual_cache_global_schema_id, sm_class::virtual_cache_local_schema_id, sm_class::virtual_cache_snapshot_version, sm_class::virtual_query_cache, vfid::volid, and ws_copy_string().

Referenced by disk_to_class(), and update_class().

Here is the caller graph for this function:

int classobj_make_class_constraints ( DB_SET class_props,
SM_ATTRIBUTE attributes,
SM_CLASS_CONSTRAINT **  con_ptr 
)

Definition at line 3114 of file class_object.c.

References ARG_FILE_LINE, sm_class_constraint::asc_desc, assert, sm_class_constraint::attributes, sm_class_constraint::attrs_prefix_length, classobj_btid_from_property_value(), classobj_find_attribute_list(), classobj_free_class_constraints(), classobj_get_prop(), classobj_make_class_constraint(), classobj_make_foreign_key_info(), classobj_make_foreign_key_ref_list(), classobj_make_function_index_info(), classobj_make_index_filter_pred_info(), classobj_make_index_prefix_info(), sm_class_constraint::comment, Constraint_properties, Constraint_types, db_get_int(), db_get_set(), db_get_string(), DB_IS_NULL, db_make_null(), DB_TYPE_INTEGER, DB_TYPE_SEQUENCE, DB_TYPE_STRING, DB_VALUE_TYPE, db_ws_alloc(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SM_INVALID_PROPERTY, sm_class_constraint::filter_predicate, sm_class_constraint::fk_info, for(), sm_class_constraint::func_index_info, i, sm_class_constraint::index_btid, sm_class_constraint::index_status, sm_class_constraint::name, sm_class_constraint::next, NO_ERROR, NULL, NUM_CONSTRAINT_TYPES, pr_clear_value(), set_get_element(), set_size(), sm_class_constraint::shared_cons_name, SM_CONSTRAINT_FOREIGN_KEY, SM_CONSTRAINT_PRIMARY_KEY, SM_CONSTRAINT_REVERSE_INDEX, SM_CONSTRAINT_REVERSE_UNIQUE, SM_FILTER_INDEX_ID, SM_FUNCTION_INDEX_ID, and SM_PREFIX_INDEX_ID.

Referenced by classobj_cache_class_constraints(), classobj_copy_props(), collect_hier_class_info(), filter_local_constraints(), flatten_properties(), smt_check_foreign_key(), smt_check_index_exist(), smt_find_owner_of_constraint(), smt_rename_any(), transfer_disk_structures(), and update_fk_ref_partitioned_class().

Here is the caller graph for this function:

static SM_CONSTRAINT * classobj_make_constraint ( const char *  name,
SM_CONSTRAINT_TYPE  type,
BTID id,
bool  has_function_constraint 
)
static
SM_DESCRIPTOR_LIST* classobj_make_desclist ( MOP  classobj,
SM_CLASS class_,
SM_COMPONENT comp,
int  write_access 
)
static SM_FOREIGN_KEY_INFO * classobj_make_foreign_key_ref_list ( DB_SEQ fk_container)
static
static DB_SEQ * classobj_make_index_attr_prefix_seq ( int  num_attrs,
const int *  attrs_prefix_length 
)
static

Definition at line 772 of file class_object.c.

References db_make_int(), i, NULL, set_create_sequence(), and set_put_element().

Referenced by classobj_put_index().

Here is the caller graph for this function:

static int * classobj_make_index_prefix_info ( DB_SEQ prefix_seq,
int  num_attrs 
)
static

Definition at line 2924 of file class_object.c.

References assert, db_get_int(), db_ws_alloc(), db_ws_free(), i, NO_ERROR, NULL, set_get_element_nocopy(), and set_size().

Referenced by classobj_make_class_constraints().

Here is the caller graph for this function:

SM_METHOD* classobj_make_method ( const char *  name,
SM_NAME_SPACE  name_space 
)
SM_METHOD_ARGUMENT* classobj_make_method_arg ( int  index)
SM_PARTITION* classobj_make_partition_info ( void  )
DB_SEQ* classobj_make_prop ( void  )

Definition at line 280 of file class_object.c.

References set_create_sequence().

Referenced by classobj_put_index(), tf_attribute_default_expr_to_property(), and vid_att_in_obj_id().

Here is the caller graph for this function:

SM_QUERY_SPEC* classobj_make_query_spec ( const char *  specification)
SM_REPR_ATTRIBUTE* classobj_make_repattribute ( int  attid,
DB_TYPE  type_id,
TP_DOMAIN domain 
)
SM_REPRESENTATION* classobj_make_representation ( void  )
SM_RESOLUTION* classobj_make_resolution ( MOP  class_mop,
const char *  name,
const char *  alias,
SM_NAME_SPACE  name_space 
)
SM_TEMPLATE* classobj_make_template ( const char *  name,
MOP  op,
SM_CLASS class_ 
)

Definition at line 6029 of file class_object.c.

References area_alloc(), sm_template::attributes, sm_class::class_attributes, sm_template::class_attributes, sm_class::class_methods, sm_template::class_methods, sm_template::class_resolutions, sm_class::class_type, sm_template::class_type, classobj_copy_attlist(), classobj_copy_methfiles(), classobj_copy_methlist(), classobj_copy_partition_info(), classobj_copy_props(), classobj_copy_query_spec_list(), classobj_copy_reslist(), classobj_free_template(), sm_template::current, error(), sm_template::ext_references, ID_CLASS, ID_INSTANCE, sm_class::inheritance, sm_template::inheritance, sm_template::instance_attributes, sm_class::loader_commands, sm_template::loader_commands, sm_class::method_files, sm_template::method_files, sm_class::methods, sm_template::methods, ml_copy(), sm_template::name, NO_ERROR, NULL, sm_template::op, sm_class::ordered_attributes, sm_class::partition, sm_template::partition, sm_template::partition_parent_atts, sm_class::properties, sm_template::properties, sm_class::query_spec, sm_template::query_spec, sm_class::resolutions, sm_template::resolutions, sm_template::shared_attributes, SM_CLASS_CT, sm_template::super_id_map, tm_Tran_index, tr_copy_schema_cache(), sm_template::tran_index, sm_class::triggers, sm_template::triggers, and ws_copy_string().

Referenced by def_class_internal(), flatten_subclasses(), flatten_template(), sm_delete_class_mop(), and smt_edit_class_mop().

Here is the caller graph for this function:

static int classobj_method_arg_size ( SM_METHOD_ARGUMENT arg)
static

Definition at line 4875 of file class_object.c.

References classobj_domain_size(), sm_method_argument::domain, and ws_list_total().

Referenced by classobj_method_signature_size().

Here is the caller graph for this function:

static int classobj_method_file_size ( SM_METHOD_FILE file)
static

Definition at line 5688 of file class_object.c.

References sm_method_file::expanded_name, sm_method_file::name, NULL, sm_method_file::source_name, and strlen.

Referenced by classobj_class_size().

Here is the caller graph for this function:

static int classobj_method_signature_size ( SM_METHOD_SIGNATURE sig)
static
static int classobj_method_size ( SM_METHOD meth)
static

Definition at line 5337 of file class_object.c.

References classobj_method_signature_size(), sm_method::header, sm_component::name, sm_method::signatures, strlen, and ws_list_total().

Referenced by classobj_class_size().

Here is the caller graph for this function:

static int classobj_partition_info_size ( SM_PARTITION partition_info)
static

Definition at line 5945 of file class_object.c.

References sm_partition::comment, db_make_sequence(), sm_partition::expr, or_packed_value_size(), sm_partition::pname, strlen, and sm_partition::values.

Referenced by classobj_class_size().

Here is the caller graph for this function:

const char** classobj_point_at_att_names ( SM_CLASS_CONSTRAINT constraint,
int *  count_ref 
)

Definition at line 6358 of file class_object.c.

References ARG_FILE_LINE, sm_class_constraint::attributes, cubregex::count(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, and NULL.

Referenced by classobj_copy_constraint_like(), and do_copy_indexes().

Here is the caller graph for this function:

static void classobj_print_props ( DB_SEQ properties)
static

Definition at line 459 of file class_object.c.

References i, max, NO_ERROR, NULL, pr_clear_value(), set_get_element(), set_print(), and set_size().

Referenced by classobj_filter_components().

Here is the caller graph for this function:

int classobj_put_index ( DB_SEQ **  properties,
SM_CONSTRAINT_TYPE  type,
const char *  constraint_name,
SM_ATTRIBUTE **  atts,
const int *  asc_desc,
const int *  attr_prefix_length,
const BTID id,
SM_PREDICATE_INFO filter_index_info,
SM_FOREIGN_KEY_INFO fk_info,
char *  shared_cons_name,
SM_FUNCTION_INFO func_index_info,
const char *  comment,
SM_INDEX_STATUS  index_status,
bool  attr_name_instead_of_id 
)
static int classobj_put_seq_and_iterate ( DB_SEQ destination,
int &  index,
DB_SEQ element 
)
static

Definition at line 880 of file class_object.c.

References assert, classobj_put_value_and_iterate(), db_make_sequence(), ER_FAILED, NO_ERROR, and NULL.

Referenced by classobj_put_index(), and classobj_put_seq_with_name_and_iterate().

Here is the caller graph for this function:

static int classobj_put_seq_with_name_and_iterate ( DB_SEQ destination,
int &  index,
const char *  name,
DB_SEQ seq 
)
static

Definition at line 900 of file class_object.c.

References classobj_put_seq_and_iterate(), classobj_put_value_and_iterate(), db_make_string(), ER_FAILED, NO_ERROR, NULL, set_create_sequence(), and set_free().

Referenced by classobj_put_index().

Here is the caller graph for this function:

static void classobj_put_value_and_iterate ( DB_SEQ destination,
int &  index,
DB_VALUE value 
)
static

Definition at line 870 of file class_object.c.

References pr_clear_value(), and set_put_element().

Referenced by classobj_put_index(), classobj_put_seq_and_iterate(), and classobj_put_seq_with_name_and_iterate().

Here is the caller graph for this function:

static int classobj_query_spec_size ( SM_QUERY_SPEC query_spec)
static

Definition at line 5927 of file class_object.c.

References sm_query_spec::specification, and strlen.

Referenced by classobj_class_size().

Here is the caller graph for this function:

void classobj_remove_class_constraint_node ( SM_CLASS_CONSTRAINT **  constraints,
SM_CLASS_CONSTRAINT node 
)

Definition at line 4124 of file class_object.c.

References sm_class_constraint::next, and NULL.

Referenced by sm_drop_index().

Here is the caller graph for this function:

static int classobj_repattribute_size ( void  )
static

Definition at line 5758 of file class_object.c.

Referenced by classobj_representation_size().

Here is the caller graph for this function:

static int classobj_representation_size ( SM_REPRESENTATION rep)
static

Definition at line 5815 of file class_object.c.

References sm_representation::attributes, classobj_repattribute_size(), sm_repr_attribute::next, and NULL.

Referenced by classobj_class_size().

Here is the caller graph for this function:

static int classobj_resolution_size ( SM_RESOLUTION res)
static

Definition at line 5483 of file class_object.c.

References sm_resolution::alias, sm_resolution::name, NULL, and strlen.

Referenced by classobj_class_size().

Here is the caller graph for this function:

static void classobj_sort_attlist ( SM_ATTRIBUTE **  source)
static

Definition at line 7003 of file class_object.c.

References for(), sm_attribute::header, sm_component::next, NULL, and sm_attribute::order.

Referenced by classobj_install_template().

Here is the caller graph for this function:

static void classobj_sort_methlist ( SM_METHOD **  source)
static

Definition at line 7038 of file class_object.c.

References for(), sm_method::header, sm_component::next, NULL, and sm_method::order.

Referenced by classobj_install_template().

Here is the caller graph for this function:

Variable Documentation

const char* Constraint_properties[]
static
Initial value:
= {
}
#define SM_PROPERTY_UNIQUE
#define SM_PROPERTY_INDEX
#define SM_PROPERTY_PRIMARY_KEY
#define SM_PROPERTY_FOREIGN_KEY
#define SM_PROPERTY_REVERSE_INDEX
#define SM_PROPERTY_REVERSE_UNIQUE

Definition at line 80 of file class_object.c.

Referenced by classobj_cache_constraints(), and classobj_make_class_constraints().

const int SM_MAX_STRING_LENGTH = 1073741823

Definition at line 69 of file class_object.c.

AREA* Template_area = NULL
static

Definition at line 94 of file class_object.c.