CUBRID Engine  latest
db_set.c File Reference
#include "db_set.h"
#include "db_set_function.h"
#include "authenticate.h"
#include "class_object.h"
#include "db.h"
#include "dbtype.h"
#include "error_manager.h"
#include "object_primitive.h"
#include "set_object.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
Include dependency graph for db_set.c:

Go to the source code of this file.

Macros

#define ERROR_SET(error, code)
 
#define ERROR_SET1(error, code, arg1)
 

Functions

DB_SETdb_set_create (MOP classop, const char *name)
 
DB_SETdb_set_create_basic (MOP classop, const char *name)
 
DB_SETdb_set_create_multi (MOP classop, const char *name)
 
DB_SETdb_seq_create (MOP classop, const char *name, int size)
 
int db_set_free (DB_SET *set)
 
int db_seq_free (DB_SEQ *seq)
 
int db_set_filter (DB_SET *set)
 
int db_seq_filter (DB_SET *set)
 
DB_SETdb_set_copy (DB_SET *source)
 
DB_SEQdb_seq_copy (DB_SEQ *source)
 
int db_set_add (DB_SET *set, DB_VALUE *value)
 
int db_set_get (DB_SET *set, int index, DB_VALUE *value)
 
int db_set_drop (DB_SET *set, DB_VALUE *value)
 
int db_set_size (DB_SET *set)
 
int db_set_cardinality (DB_SET *set)
 
int db_set_ismember (DB_SET *set, DB_VALUE *value)
 
int db_set_isempty (DB_SET *set)
 
int db_set_has_null (DB_COLLECTION *set)
 
int db_set_print (DB_SET *set)
 
DB_TYPE db_set_type (DB_SET *set)
 
int db_seq_get (DB_SET *set, int index, DB_VALUE *value)
 
int db_seq_put (DB_SET *set, int index, DB_VALUE *value)
 
int db_seq_insert (DB_SET *set, int index, DB_VALUE *value)
 
int db_seq_drop (DB_SET *set, int index)
 
int db_seq_size (DB_SET *set)
 
int db_seq_cardinality (DB_SET *set)
 
int db_seq_print (DB_SET *set)
 
int db_seq_find (DB_SET *set, DB_VALUE *value, int index)
 
DB_COLLECTIONdb_col_create (DB_TYPE type, int size, DB_DOMAIN *domain)
 
DB_COLLECTIONdb_col_copy (DB_COLLECTION *col)
 
int db_col_free (DB_COLLECTION *col)
 
int db_col_filter (DB_COLLECTION *col)
 
int db_col_add (DB_COLLECTION *col, DB_VALUE *value)
 
int db_col_drop (DB_COLLECTION *col, DB_VALUE *value, int all)
 
int db_col_drop_element (DB_COLLECTION *col, int element_index)
 
int db_col_drop_nulls (DB_COLLECTION *col)
 
int db_col_size (DB_COLLECTION *col)
 
int db_col_cardinality (DB_COLLECTION *col)
 
int db_col_get (DB_COLLECTION *col, int element_index, DB_VALUE *value)
 
int db_col_put (DB_COLLECTION *col, int element_index, DB_VALUE *value)
 
int db_col_insert (DB_COLLECTION *col, int element_index, DB_VALUE *value)
 
int db_col_ismember (DB_COLLECTION *col, DB_VALUE *value)
 
int db_col_find (DB_COLLECTION *col, DB_VALUE *value, int starting_index, int *found_index)
 
DB_TYPE db_col_type (DB_COLLECTION *col)
 
DB_DOMAINdb_col_domain (DB_COLLECTION *col)
 
int db_col_fprint (FILE *fp, DB_COLLECTION *col)
 
int db_col_print (DB_COLLECTION *col)
 
int db_col_optimize (DB_COLLECTION *col)
 

Macro Definition Documentation

#define ERROR_SET (   error,
  code 
)
Value:
do { \
error = code; \
} while (0)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
static void error(const char *msg)
Definition: gencat.c:331
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 44 of file db_set.c.

Referenced by db_seq_insert(), db_seq_put(), and db_set_add().

#define ERROR_SET1 (   error,
  code,
  arg1 
)
Value:
do { \
error = code; \
} while (0)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
static void error(const char *msg)
Definition: gencat.c:331
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 50 of file db_set.c.

Referenced by db_seq_create(), db_set_create(), db_set_create_basic(), and db_set_create_multi().

Function Documentation

int db_col_add ( DB_COLLECTION col,
DB_VALUE value 
)
int db_col_cardinality ( DB_COLLECTION col)

Definition at line 1192 of file db_set.c.

References CHECK_1ARG_MINUSONE, CHECK_CONNECT_MINUSONE, and set_cardinality().

DB_COLLECTION* db_col_copy ( DB_COLLECTION col)

Definition at line 975 of file db_set.c.

References CHECK_CONNECT_NULL, NULL, and set_copy().

DB_COLLECTION* db_col_create ( DB_TYPE  type,
int  size,
DB_DOMAIN domain 
)

Definition at line 949 of file db_set.c.

References CHECK_CONNECT_NULL, NULL, set_create(), and set_create_with_domain().

Referenced by api_collection_set_to_db_value(), and ldr_collection_db_collection().

Here is the caller graph for this function:

DB_DOMAIN* db_col_domain ( DB_COLLECTION col)

Definition at line 1421 of file db_set.c.

References CHECK_1ARG_NULL, CHECK_CONNECT_NULL, NULL, and set_get_domain().

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

int db_col_drop ( DB_COLLECTION col,
DB_VALUE value,
int  all 
)
int db_col_drop_element ( DB_COLLECTION col,
int  element_index 
)
int db_col_drop_nulls ( DB_COLLECTION col)
int db_col_filter ( DB_COLLECTION col)
int db_col_find ( DB_COLLECTION col,
DB_VALUE value,
int  starting_index,
int *  found_index 
)
int db_col_fprint ( FILE *  fp,
DB_COLLECTION col 
)

Definition at line 1444 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, NO_ERROR, NULL, and set_fprint().

Referenced by db_col_print().

Here is the caller graph for this function:

int db_col_free ( DB_COLLECTION col)

Definition at line 998 of file db_set.c.

References NO_ERROR, NULL, and set_free().

Referenced by api_collection_set_to_db_value(), and fn_collection().

Here is the caller graph for this function:

int db_col_get ( DB_COLLECTION col,
int  element_index,
DB_VALUE value 
)

Definition at line 1222 of file db_set.c.

References CHECK_2ARGS_ERROR, CHECK_CONNECT_ERROR, error(), and set_get_element().

Referenced by execute_info_set(), fill_collection(), pt_to_list_key(), ux_col_get(), and ux_get_generated_keys_client_insert().

Here is the caller graph for this function:

int db_col_insert ( DB_COLLECTION col,
int  element_index,
DB_VALUE value 
)
int db_col_ismember ( DB_COLLECTION col,
DB_VALUE value 
)

Definition at line 1327 of file db_set.c.

References CHECK_1ARG_MINUSONE, CHECK_CONNECT_MINUSONE, and set_ismember().

int db_col_optimize ( DB_COLLECTION col)

Definition at line 1478 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, error(), NO_ERROR, and set_optimize().

int db_col_print ( DB_COLLECTION col)

Definition at line 1466 of file db_set.c.

References db_col_fprint().

int db_col_put ( DB_COLLECTION col,
int  element_index,
DB_VALUE value 
)

Definition at line 1249 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, DB_TYPE_SEQUENCE, error(), NO_ERROR, NULL, db_set::owner, set_add_element(), set_get_type(), and set_put_element().

Referenced by set_to_db_value_mapf().

Here is the caller graph for this function:

int db_col_size ( DB_COLLECTION col)
DB_TYPE db_col_type ( DB_COLLECTION col)
int db_seq_cardinality ( DB_SET set)

Definition at line 867 of file db_set.c.

References CHECK_1ARG_MINUSONE, CHECK_CONNECT_MINUSONE, and set_cardinality().

DB_SEQ* db_seq_copy ( DB_SEQ source)
int db_seq_drop ( DB_SET set,
int  index 
)

Definition at line 823 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, NULL, and set_drop_seq_element().

Referenced by ux_col_seq_drop().

Here is the caller graph for this function:

int db_seq_filter ( DB_SET set)
int db_seq_find ( DB_SET set,
DB_VALUE value,
int  index 
)

Definition at line 908 of file db_set.c.

References CHECK_2ARGS_ERROR, CHECK_CONNECT_ERROR, and set_find_seq_element().

int db_seq_free ( DB_SEQ seq)

Definition at line 323 of file db_set.c.

References NO_ERROR, NULL, and set_free().

Referenced by heap_clear_partition_info(), heap_get_partitions_from_subclasses(), partition_free_cache_entry(), and partition_pruning_context_to_cache_entry().

Here is the caller graph for this function:

int db_seq_insert ( DB_SET set,
int  index,
DB_VALUE value 
)
int db_seq_print ( DB_SET set)

Definition at line 886 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, NO_ERROR, and set_print().

int db_seq_size ( DB_SET set)

Definition at line 848 of file db_set.c.

References CHECK_1ARG_MINUSONE, CHECK_CONNECT_MINUSONE, and set_size().

Referenced by qdata_add_sequence_to_dbval(), set_has_objs(), setof_mop_to_setof_vobj(), and vid_fetch_instance().

Here is the caller graph for this function:

int db_set_cardinality ( DB_SET set)

Definition at line 578 of file db_set.c.

References CHECK_1ARG_MINUSONE, CHECK_CONNECT_MINUSONE, and set_cardinality().

Referenced by vid_fetch_instance().

Here is the caller graph for this function:

DB_SET* db_set_copy ( DB_SET source)

Definition at line 402 of file db_set.c.

References CHECK_CONNECT_NULL, NULL, and set_copy().

int db_set_drop ( DB_SET set,
DB_VALUE value 
)

Definition at line 530 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, CHECK_MODIFICATION_ERROR, NULL, and set_drop_element().

Referenced by au_drop_member(), and ux_col_set_drop().

Here is the caller graph for this function:

int db_set_filter ( DB_SET set)
int db_set_free ( DB_SET set)

Definition at line 306 of file db_set.c.

References NO_ERROR, NULL, and set_free().

Referenced by cursor_fixup_set_vobjs(), dbval_to_net_buf(), or_get_all_representation(), or_get_current_representation(), and or_get_old_representation().

Here is the caller graph for this function:

int db_set_has_null ( DB_COLLECTION set)

Definition at line 644 of file db_set.c.

References CHECK_1ARG_FALSE, CHECK_CONNECT_FALSE, and set_has_null().

Referenced by partition_prune_list().

Here is the caller graph for this function:

int db_set_isempty ( DB_SET set)

Definition at line 621 of file db_set.c.

References CHECK_1ARG_FALSE, CHECK_CONNECT_FALSE, and set_isempty().

int db_set_ismember ( DB_SET set,
DB_VALUE value 
)

Definition at line 598 of file db_set.c.

References CHECK_1ARG_FALSE, CHECK_CONNECT_FALSE, and set_ismember().

Referenced by partition_prune_list().

Here is the caller graph for this function:

int db_set_print ( DB_SET set)

Definition at line 664 of file db_set.c.

References CHECK_1ARG_ERROR, CHECK_CONNECT_ERROR, NO_ERROR, and set_print().

Referenced by cursor_fetch_page_having_tuple().

Here is the caller graph for this function:

DB_TYPE db_set_type ( DB_SET set)

Definition at line 683 of file db_set.c.

References DB_TYPE_NULL, NULL, and set_get_type().

Referenced by ex_contains_object_reference(), and setof_mop_to_setof_vobj().

Here is the caller graph for this function: