Skip to content

File object_accessor.c

FileList > cubrid > src > object > object_accessor.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <stdarg.h>
  • #include <assert.h>
  • #include "chartype.h"
  • #include "error_manager.h"
  • #include "system_parameter.h"
  • #include "server_interface.h"
  • #include "dbtype.h"
  • #include "work_space.h"
  • #include "object_domain.h"
  • #include "object_primitive.h"
  • #include "object_representation.h"
  • #include "set_object.h"
  • #include "class_object.h"
  • #include "schema_manager.h"
  • #include "object_accessor.h"
  • #include "authenticate.h"
  • #include "db.h"
  • #include "locator_cl.h"
  • #include "virtual_object.h"
  • #include "parser.h"
  • #include "transaction_cl.h"
  • #include "trigger_manager.h"
  • #include "view_transform.h"
  • #include "network_interface_cl.h"

Classes

Type Name
struct argstate

Public Types

Type Name
typedef struct argstate ARGSTATE
enum TEMPOID_FLUSH_RESULT

Public Attributes

Type Name
char * obj_Method_error_msg

Public Static Attributes

Type Name
int forge_flag_pat = 0
int obj_Method_call_level = 0

Public Functions

Type Name
char * obj_alloc (SM_CLASS * class_, int bound_bit_status)
int obj_assign_value (MOP op, SM_ATTRIBUTE * att, char * mem, DB_VALUE * value)
int obj_class_lock (MOP op, int for_write)
MOP obj_copy (MOP op)
MOP obj_create (MOP classop)
MOP obj_create_by_name (const char * name)
int obj_delete (MOP op)
MOP obj_desc_find_unique (MOP op, SM_DESCRIPTOR * desc, DB_VALUE * value, AU_FETCHMODE fetchmode)
int obj_desc_get (MOP op, SM_DESCRIPTOR * desc, DB_VALUE * value)
int obj_desc_send_array (MOP obj, SM_DESCRIPTOR * desc, DB_VALUE * returnval, DB_VALUE ** argarray)
int obj_desc_send_array_quick (MOP obj, SM_DESCRIPTOR * desc, DB_VALUE * returnval, int nargs, DB_VALUE ** argarray)
int obj_desc_send_list (MOP obj, SM_DESCRIPTOR * desc, DB_VALUE * returnval, DB_VALUE_LIST * arglist)
int obj_desc_send_stack (MOP obj, SM_DESCRIPTOR * desc, DB_VALUE * returnval, ...)
int obj_desc_send_va (MOP obj, SM_DESCRIPTOR * desc, DB_VALUE * returnval, va_list args)
int obj_desc_set (MOP op, SM_DESCRIPTOR * desc, DB_VALUE * value)
MOP obj_find_multi_attr (MOP op, int size, const char * attr_names, const DB_VALUE * values, AU_FETCHMODE fetchmode)
MOP obj_find_multi_desc (MOP op, int size, const SM_DESCRIPTOR * desc, const DB_VALUE * values, AU_FETCHMODE fetchmode)
MOP obj_find_object_by_pkey (MOP classop, DB_VALUE * key, AU_FETCHMODE fetchmode)
MOP obj_find_primary_key (MOP op, const DB_VALUE ** values, int size, AU_FETCHMODE fetchmode)
MOP obj_find_unique (MOP op, const char * attname, DB_VALUE * value, AU_FETCHMODE fetchmode)
int obj_find_unique_id (MOP op, const char * att_name, BTID * id_array, int id_array_size, int * total_ids)
void obj_free_memory (SM_CLASS * class_, MOBJ obj)
int obj_get (MOP op, const char * name, DB_VALUE * value)
int obj_get_att (MOP op, SM_CLASS * class_, SM_ATTRIBUTE * att, DB_VALUE * value)
int obj_get_path (DB_OBJECT * object, const char * attpath, DB_VALUE * value)
int obj_get_shared (MOP op, const char * name, DB_VALUE * value)
int obj_get_value (MOP op, SM_ATTRIBUTE * att, void * mem, DB_VALUE * source, DB_VALUE * dest)
int obj_inst_lock (MOP op, int for_write)
int obj_is_instance_of (MOP obj, MOP class_mop)
int obj_isclass (MOP obj)
int obj_isinstance (MOP obj)
int obj_locate_attribute (MOP op, int attid, int for_write, char ** memp, SM_ATTRIBUTE ** attp)
int obj_lock (MOP op, int for_write)
int obj_send (MOP obj, const char * name, DB_VALUE * returnval, DB_VALUE_LIST * arglist)
int obj_send_array (MOP obj, const char * name, DB_VALUE * returnval, DB_VALUE ** argarray)
int obj_send_list (MOP obj, const char * name, DB_VALUE * returnval, DB_VALUE_LIST * arglist)
int obj_send_stack (MOP obj, const char * name, DB_VALUE * returnval, ...)
int obj_send_va (MOP obj, const char * name, DB_VALUE * returnval, va_list args)
int obj_set (MOP op, const char * name, DB_VALUE * value)
int obj_set_shared (MOP op, const char * name, DB_VALUE * value)

Public Static Functions

Type Name
void argstate_from_array (ARGSTATE * state, DB_VALUE ** argarray)
void argstate_from_list (ARGSTATE * state, DB_VALUE_LIST * arglist)
void argstate_from_va (ARGSTATE * state, va_list args, int nargs)
int assign_null_value (MOP op, SM_ATTRIBUTE * att, char * mem)
int assign_set_value (MOP op, SM_ATTRIBUTE * att, char * mem, SETREF * setref)
int call_method (METHOD_FUNCTION method, MOP obj, DB_VALUE * returnval, int nargs, DB_VALUE ** values, DB_VALUE_LIST * overow)
int check_args (SM_METHOD * method, ARGSTATE * state)
void cleanup_argstate (ARGSTATE * state)
int find_attribute (SM_CLASS ** classp, SM_ATTRIBUTE ** attp, MOP op, const char * name, int for_write)
int find_shared_attribute (SM_CLASS ** classp, SM_ATTRIBUTE ** attp, MOP op, const char * name, int for_write)
MOP find_unique (MOP classop, SM_ATTRIBUTE * att, DB_VALUE * value, AU_FETCHMODE fetchmode)
int flush_temporary_OID (MOP classop, DB_VALUE * key)
int get_object_value (MOP op, SM_ATTRIBUTE * att, char * mem, DB_VALUE * source, DB_VALUE * dest)
int get_set_value (MOP op, SM_ATTRIBUTE * att, char * mem, DB_VALUE * source, DB_VALUE * dest)
MOP obj_find_object_by_cons_and_key (MOP classop, SM_CLASS_CONSTRAINT * cons, DB_VALUE * key, AU_FETCHMODE fetchmode)
int obj_get_temp (DB_OBJECT * obj, SM_CLASS * class_, SM_ATTRIBUTE * att, DB_VALUE * value)
DB_VALUE * obj_make_key_value (DB_VALUE * key, const DB_VALUE * values, int size)
int obj_send_method_array (MOP obj, SM_CLASS * class_, SM_METHOD * method, DB_VALUE * returnval, DB_VALUE ** argarray)
int obj_send_method_list (MOP obj, SM_CLASS * class_, SM_METHOD * method, DB_VALUE * returnval, DB_VALUE_LIST * arglist)
int obj_send_method_va (MOP obj, SM_CLASS * class_, SM_METHOD * method, DB_VALUE * returnval, va_list args)
int obj_set_att (MOP op, SM_CLASS * class_, SM_ATTRIBUTE * att, DB_VALUE * value, SM_VALIDATION * valid)
int obj_set_temp (DB_OBJECT * obj, SM_ATTRIBUTE * att, DB_VALUE * value)

Macros

Type Name
define MAX_DOMAIN_NAME 128
define OBJ_MAX_ARGS 32

Public Types Documentation

typedef ARGSTATE

typedef struct argstate ARGSTATE;

enum TEMPOID_FLUSH_RESULT

enum TEMPOID_FLUSH_RESULT {
    TEMPOID_FLUSH_FAIL = -1,
    TEMPOID_FLUSH_OK = 0,
    TEMPOID_FLUSH_NOT_SUPPORT = 1
};

Public Attributes Documentation

variable obj_Method_error_msg

char* obj_Method_error_msg;

Public Static Attributes Documentation

variable forge_flag_pat

int forge_flag_pat;

variable obj_Method_call_level

int obj_Method_call_level;

Public Functions Documentation

function obj_alloc

char * obj_alloc (
    SM_CLASS * class_,
    int bound_bit_status
) 

function obj_assign_value

int obj_assign_value (
    MOP op,
    SM_ATTRIBUTE * att,
    char * mem,
    DB_VALUE * value
) 

function obj_class_lock

int obj_class_lock (
    MOP op,
    int for_write
) 

function obj_copy

MOP obj_copy (
    MOP op
) 

function obj_create

MOP obj_create (
    MOP classop
) 

function obj_create_by_name

MOP obj_create_by_name (
    const  char * name
) 

function obj_delete

int obj_delete (
    MOP op
) 

function obj_desc_find_unique

MOP obj_desc_find_unique (
    MOP op,
    SM_DESCRIPTOR * desc,
    DB_VALUE * value,
    AU_FETCHMODE fetchmode
) 

function obj_desc_get

int obj_desc_get (
    MOP op,
    SM_DESCRIPTOR * desc,
    DB_VALUE * value
) 

function obj_desc_send_array

int obj_desc_send_array (
    MOP obj,
    SM_DESCRIPTOR * desc,
    DB_VALUE * returnval,
    DB_VALUE ** argarray
) 

function obj_desc_send_array_quick

int obj_desc_send_array_quick (
    MOP obj,
    SM_DESCRIPTOR * desc,
    DB_VALUE * returnval,
    int nargs,
    DB_VALUE ** argarray
) 

function obj_desc_send_list

int obj_desc_send_list (
    MOP obj,
    SM_DESCRIPTOR * desc,
    DB_VALUE * returnval,
    DB_VALUE_LIST * arglist
) 

function obj_desc_send_stack

int obj_desc_send_stack (
    MOP obj,
    SM_DESCRIPTOR * desc,
    DB_VALUE * returnval,
    ...
) 

function obj_desc_send_va

int obj_desc_send_va (
    MOP obj,
    SM_DESCRIPTOR * desc,
    DB_VALUE * returnval,
    va_list args
) 

function obj_desc_set

int obj_desc_set (
    MOP op,
    SM_DESCRIPTOR * desc,
    DB_VALUE * value
) 

function obj_find_multi_attr

MOP obj_find_multi_attr (
    MOP op,
    int size,
    const  char * attr_names,
    const  DB_VALUE * values,
    AU_FETCHMODE fetchmode
) 

function obj_find_multi_desc

MOP obj_find_multi_desc (
    MOP op,
    int size,
    const  SM_DESCRIPTOR * desc,
    const  DB_VALUE * values,
    AU_FETCHMODE fetchmode
) 

function obj_find_object_by_pkey

MOP obj_find_object_by_pkey (
    MOP classop,
    DB_VALUE * key,
    AU_FETCHMODE fetchmode
) 

function obj_find_primary_key

MOP obj_find_primary_key (
    MOP op,
    const  DB_VALUE ** values,
    int size,
    AU_FETCHMODE fetchmode
) 

function obj_find_unique

MOP obj_find_unique (
    MOP op,
    const  char * attname,
    DB_VALUE * value,
    AU_FETCHMODE fetchmode
) 

function obj_find_unique_id

int obj_find_unique_id (
    MOP op,
    const  char * att_name,
    BTID * id_array,
    int id_array_size,
    int * total_ids
) 

function obj_free_memory

void obj_free_memory (
    SM_CLASS * class_,
    MOBJ obj
) 

function obj_get

int obj_get (
    MOP op,
    const  char * name,
    DB_VALUE * value
) 

function obj_get_att

int obj_get_att (
    MOP op,
    SM_CLASS * class_,
    SM_ATTRIBUTE * att,
    DB_VALUE * value
) 

function obj_get_path

int obj_get_path (
    DB_OBJECT * object,
    const  char * attpath,
    DB_VALUE * value
) 

function obj_get_shared

int obj_get_shared (
    MOP op,
    const  char * name,
    DB_VALUE * value
) 

function obj_get_value

int obj_get_value (
    MOP op,
    SM_ATTRIBUTE * att,
    void * mem,
    DB_VALUE * source,
    DB_VALUE * dest
) 

function obj_inst_lock

int obj_inst_lock (
    MOP op,
    int for_write
) 

function obj_is_instance_of

int obj_is_instance_of (
    MOP obj,
    MOP class_mop
) 

function obj_isclass

int obj_isclass (
    MOP obj
) 

function obj_isinstance

int obj_isinstance (
    MOP obj
) 

function obj_locate_attribute

int obj_locate_attribute (
    MOP op,
    int attid,
    int for_write,
    char ** memp,
    SM_ATTRIBUTE ** attp
) 

function obj_lock

int obj_lock (
    MOP op,
    int for_write
) 

function obj_send

int obj_send (
    MOP obj,
    const  char * name,
    DB_VALUE * returnval,
    DB_VALUE_LIST * arglist
) 

function obj_send_array

int obj_send_array (
    MOP obj,
    const  char * name,
    DB_VALUE * returnval,
    DB_VALUE ** argarray
) 

function obj_send_list

int obj_send_list (
    MOP obj,
    const  char * name,
    DB_VALUE * returnval,
    DB_VALUE_LIST * arglist
) 

function obj_send_stack

int obj_send_stack (
    MOP obj,
    const  char * name,
    DB_VALUE * returnval,
    ...
) 

function obj_send_va

int obj_send_va (
    MOP obj,
    const  char * name,
    DB_VALUE * returnval,
    va_list args
) 

function obj_set

int obj_set (
    MOP op,
    const  char * name,
    DB_VALUE * value
) 

function obj_set_shared

int obj_set_shared (
    MOP op,
    const  char * name,
    DB_VALUE * value
) 

Public Static Functions Documentation

function argstate_from_array

static void argstate_from_array (
    ARGSTATE * state,
    DB_VALUE ** argarray
) 

function argstate_from_list

static void argstate_from_list (
    ARGSTATE * state,
    DB_VALUE_LIST * arglist
) 

function argstate_from_va

static void argstate_from_va (
    ARGSTATE * state,
    va_list args,
    int nargs
) 

function assign_null_value

static int assign_null_value (
    MOP op,
    SM_ATTRIBUTE * att,
    char * mem
) 

function assign_set_value

static int assign_set_value (
    MOP op,
    SM_ATTRIBUTE * att,
    char * mem,
    SETREF * setref
) 

function call_method

static int call_method (
    METHOD_FUNCTION method,
    MOP obj,
    DB_VALUE * returnval,
    int nargs,
    DB_VALUE ** values,
    DB_VALUE_LIST * overow
) 

function check_args

static int check_args (
    SM_METHOD * method,
    ARGSTATE * state
) 

function cleanup_argstate

static void cleanup_argstate (
    ARGSTATE * state
) 

function find_attribute

static int find_attribute (
    SM_CLASS ** classp,
    SM_ATTRIBUTE ** attp,
    MOP op,
    const  char * name,
    int for_write
) 

function find_shared_attribute

static int find_shared_attribute (
    SM_CLASS ** classp,
    SM_ATTRIBUTE ** attp,
    MOP op,
    const  char * name,
    int for_write
) 

function find_unique

static MOP find_unique (
    MOP classop,
    SM_ATTRIBUTE * att,
    DB_VALUE * value,
    AU_FETCHMODE fetchmode
) 

function flush_temporary_OID

static int flush_temporary_OID (
    MOP classop,
    DB_VALUE * key
) 

function get_object_value

static int get_object_value (
    MOP op,
    SM_ATTRIBUTE * att,
    char * mem,
    DB_VALUE * source,
    DB_VALUE * dest
) 

function get_set_value

static int get_set_value (
    MOP op,
    SM_ATTRIBUTE * att,
    char * mem,
    DB_VALUE * source,
    DB_VALUE * dest
) 

function obj_find_object_by_cons_and_key

static MOP obj_find_object_by_cons_and_key (
    MOP classop,
    SM_CLASS_CONSTRAINT * cons,
    DB_VALUE * key,
    AU_FETCHMODE fetchmode
) 

function obj_get_temp

static int obj_get_temp (
    DB_OBJECT * obj,
    SM_CLASS * class_,
    SM_ATTRIBUTE * att,
    DB_VALUE * value
) 

function obj_make_key_value

static DB_VALUE * obj_make_key_value (
    DB_VALUE * key,
    const  DB_VALUE * values,
    int size
) 

function obj_send_method_array

static int obj_send_method_array (
    MOP obj,
    SM_CLASS * class_,
    SM_METHOD * method,
    DB_VALUE * returnval,
    DB_VALUE ** argarray
) 

function obj_send_method_list

static int obj_send_method_list (
    MOP obj,
    SM_CLASS * class_,
    SM_METHOD * method,
    DB_VALUE * returnval,
    DB_VALUE_LIST * arglist
) 

function obj_send_method_va

static int obj_send_method_va (
    MOP obj,
    SM_CLASS * class_,
    SM_METHOD * method,
    DB_VALUE * returnval,
    va_list args
) 

function obj_set_att

static int obj_set_att (
    MOP op,
    SM_CLASS * class_,
    SM_ATTRIBUTE * att,
    DB_VALUE * value,
    SM_VALIDATION * valid
) 

function obj_set_temp

static int obj_set_temp (
    DB_OBJECT * obj,
    SM_ATTRIBUTE * att,
    DB_VALUE * value
) 

Macro Definition Documentation

define MAX_DOMAIN_NAME

#define MAX_DOMAIN_NAME `128`

define OBJ_MAX_ARGS

#define OBJ_MAX_ARGS `32`


The documentation for this class was generated from the following file cubrid/src/object/object_accessor.c