CUBRID Engine  latest
virtual_object.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * virtual_object.h - External definitions for VID's
21  */
22 
23 #ifndef _VIRTUAL_OBJECT_H_
24 #define _VIRTUAL_OBJECT_H_
25 
26 #ident "$Id$"
27 
28 #if defined (SERVER_MODE)
29 #error Does not belong to server module
30 #endif /* defined (SERVER_MODE) */
31 
32 #include "locator_cl.h"
33 #include "class_object.h"
34 
35 typedef enum vid_statement_type
36 {
41 
42 /* From virtual_object_2.h */
43 extern const LOCK lk_Conv[][9]; /* TODO : From lock.c */
44 extern int vid_flush_instance (MOP mop, void *arg);
45 
46 
47 extern bool vid_inhibit_null_check;
48 
49 extern int vid_is_new_pobj (MOP mop);
50 extern int vid_make_vobj (const OID * view_oid, const OID * class_oid, const DB_VALUE * keys, DB_VALUE * vobj);
51 extern MOBJ vid_fetch_instance (MOP mop, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE read_fetch_version_type);
52 extern MOBJ vid_upd_instance (MOP mop);
53 extern int vid_flush_all_instances (MOP class_mop, bool decache);
54 extern int vid_flush_and_rehash (MOP mop);
56 extern int vid_allflush (void);
57 extern MOP vid_add_virtual_instance (MOBJ instance, MOP vclass_mop, MOP bclass_mop, SM_CLASS * bclass);
58 extern MOP vid_build_virtual_mop (MOP bmop, MOP vclass_mop);
59 extern MOP vid_get_referenced_mop (MOP mop);
60 extern bool vid_is_updatable (MOP mop);
61 extern bool vid_is_base_instance (MOP mop);
62 extern MOP vid_base_instance (MOP mop);
63 extern bool vid_att_in_obj_id (SM_ATTRIBUTE * attribute_p);
64 #if defined(ENABLE_UNUSED_FUNCTION)
65 extern int vid_set_att_obj_id (const char *class_name, SM_ATTRIBUTE * attribute_p, int id_no);
66 extern int vid_record_update (MOP mop, SM_CLASS * class_p, SM_ATTRIBUTE * attribute_p);
67 #endif
68 extern bool vid_compare_non_updatable_objects (MOP mop1, MOP mop2);
69 
70 extern void vid_rem_instance (MOP mop);
71 extern void vid_decache_instance (MOP mop);
72 extern void vid_get_keys (MOP mop, DB_VALUE * value);
73 extern DB_OBJLIST *vid_getall_mops (MOP class_mop, SM_CLASS * class_p, DB_FETCH_MODE purpose);
74 extern int vid_vobj_to_object (const DB_VALUE * vobj, DB_OBJECT ** mop);
75 extern int vid_oid_to_object (const DB_VALUE * value, DB_OBJECT ** mop);
76 extern int vid_object_to_vobj (const DB_OBJECT * obj, DB_VALUE * vobj);
77 extern int vid_encode_object (DB_OBJECT * object, char *string, int allocated_length, int *actual_length);
78 extern int vid_decode_object (const char *string, DB_OBJECT ** object);
79 
80 #endif /* _VIRTUAL_OBJECT_H_ */
LC_FETCH_VERSION_TYPE
Definition: locator.h:178
int vid_make_vobj(const OID *view_oid, const OID *class_oid, const DB_VALUE *keys, DB_VALUE *vobj)
void vid_get_keys(MOP mop, DB_VALUE *value)
int vid_allflush(void)
char * MOBJ
Definition: work_space.h:174
MOP vid_get_referenced_mop(MOP mop)
bool vid_att_in_obj_id(SM_ATTRIBUTE *attribute_p)
bool vid_compare_non_updatable_objects(MOP mop1, MOP mop2)
MOBJ vid_fetch_instance(MOP mop, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE read_fetch_version_type)
enum vid_statement_type VID_STATEMENT_TYPE
bool vid_inhibit_null_check
LOCK
MOP vid_build_virtual_mop(MOP bmop, MOP vclass_mop)
int vid_decode_object(const char *string, DB_OBJECT **object)
int vid_oid_to_object(const DB_VALUE *value, DB_OBJECT **mop)
int vid_flush_and_rehash(MOP mop)
int vid_object_to_vobj(const DB_OBJECT *obj, DB_VALUE *vobj)
DB_VALUE * vid_flush_and_rehash_lbl(DB_VALUE *value)
int vid_encode_object(DB_OBJECT *object, char *string, int allocated_length, int *actual_length)
int vid_is_new_pobj(MOP mop)
MOP vid_base_instance(MOP mop)
vid_statement_type
DB_OBJLIST * vid_getall_mops(MOP class_mop, SM_CLASS *class_p, DB_FETCH_MODE purpose)
int vid_vobj_to_object(const DB_VALUE *vobj, DB_OBJECT **mop)
entry_workpool * instance
int vid_flush_instance(MOP mop, void *arg)
int vid_flush_all_instances(MOP class_mop, bool decache)
const LOCK lk_Conv[][9]
void vid_decache_instance(MOP mop)
MOBJ vid_upd_instance(MOP mop)
DB_FETCH_MODE
Definition: dbtype_def.h:215
MOP vid_add_virtual_instance(MOBJ instance, MOP vclass_mop, MOP bclass_mop, SM_CLASS *bclass)
void vid_rem_instance(MOP mop)
bool vid_is_base_instance(MOP mop)
bool vid_is_updatable(MOP mop)