CUBRID Engine  latest
class_description.cpp
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  * class_description.cpp
21  */
22 
23 #include "class_description.hpp"
24 
25 #include "authenticate.h"
26 #include "class_object.h"
27 #include "locator_cl.h"
28 #include "mem_block.hpp"
29 #include "message_catalog.h"
30 #include "msgcat_help.hpp"
31 #include "object_printer.hpp"
32 #include "object_print_util.hpp"
33 #include "parse_tree.h"
34 #include "parser.h"
35 #include "schema_manager.h"
36 #include "string_buffer.hpp"
37 
38 namespace
39 {
40  void describe_trigger_list (tr_triglist *trig, string_buffer &sb, object_printer &printer, std::vector<char *> &v)
41  {
42  for (TR_TRIGLIST *t = trig; t != NULL; t = t->next)
43  {
44  sb.clear ();
45  printer.describe_class_trigger (*t->trigger);
46  v.push_back (object_print::copy_string (sb.get_buffer ()));
47  }
48  }
49 
50  void init_triggers (const sm_class &cls, struct db_object &dbo, string_buffer &sb, object_printer &printer,
51  std::vector<char *> &triggers)
52  {
53  SM_ATTRIBUTE *attribute_p;
54  TR_SCHEMA_CACHE *cache;
55  int i;
56 
57  cache = cls.triggers;
58  if (cache != NULL && !tr_validate_schema_cache (cache, &dbo))
59  {
60  for (i = 0; i < cache->array_length; i++)
61  {
62  describe_trigger_list (cache->triggers[i], sb, printer, triggers);
63  }
64  }
65 
66  for (attribute_p = cls.ordered_attributes; attribute_p != NULL; attribute_p = attribute_p->order_link)
67  {
68  cache = attribute_p->triggers;
69  if (cache != NULL && !tr_validate_schema_cache (cache, &dbo))
70  {
71  for (i = 0; i < cache->array_length; i++)
72  {
73  describe_trigger_list (cache->triggers[i], sb, printer, triggers);
74  }
75  }
76  }
77 
78  for (attribute_p = cls.class_attributes; attribute_p != NULL;
79  attribute_p = (SM_ATTRIBUTE *) attribute_p->header.next)
80  {
81  cache = attribute_p->triggers;
82  if (cache != NULL && !tr_validate_schema_cache (cache, &dbo))
83  {
84  for (i = 0; i < cache->array_length; i++)
85  {
86  describe_trigger_list (cache->triggers[i], sb, printer, triggers);
87  }
88  }
89  }
90  }
91 } //namespace
92 
93 //former obj_print_make_class_help()
95  : name (NULL)
96  , class_type (NULL)
97  , collation (NULL)
98  , supers (NULL)
99  , subs (NULL)
100  , attributes (NULL)
101  , class_attributes (NULL)
102  , methods (NULL)
103  , class_methods (NULL)
104  , resolutions (NULL)
105  , method_files (NULL)
106  , query_spec (NULL)
107  , object_id (NULL)
108  , triggers ()
109  , constraints (NULL)
110  , partition ()
111  , comment (NULL)
112 {
113 }
114 
116 {
117  if (name != NULL)
118  {
119  free (name);
120  }
121  if (class_type != NULL)
122  {
123  free (class_type);
124  }
125  if (object_id != NULL)
126  {
127  free (object_id);
128  }
129  if (collation != NULL)
130  {
131  free (collation);
132  }
142 #if 0 //bSolo: temporary until evolve above gcc 4.4.7
143  for (auto it: triggers)
144  {
145  free (it);
146  }
147 #else
148  for (auto it=triggers.begin (); it != triggers.end (); ++it)
149  {
150  free (*it);
151  }
152 #endif
153  triggers.clear ();
155 #if 0 //bSolo: temporary until evolve above gcc 4.4.7
156  for (auto it: partition)
157  {
158  free (it);
159  }
160 #else
161  for (auto it=partition.begin (); it != partition.end (); ++it)
162  {
163  free (*it);
164  }
165 #endif
166  partition.clear ();
167  if (comment != NULL)
168  {
169  free (comment);
170  }
171 }
172 
173 int class_description::init (const char *name)
174 {
175  db_object *op = sm_find_class (name);
176  if (op == NULL)
177  {
178  int error_code = NO_ERROR;
179  ASSERT_ERROR_AND_SET (error_code);
180  return error_code;
181  }
182  return init (op, CSQL_SCHEMA_COMMAND);
183 }
184 
185 int class_description::init (struct db_object *op, type prt_type)
186 {
187  assert (op != NULL);
188  string_buffer sb;
189  return init (op, prt_type, sb);
190 }
191 
192 int class_description::init (struct db_object *op, type prt_type, string_buffer &sb)
193 {
194  assert (op != NULL);
195 
196  // cleanup before (re)initialize
197  this->~class_description ();
198 
199  SM_CLASS *class_;
200  SM_ATTRIBUTE *a;
201  SM_METHOD *m;
202  SM_QUERY_SPEC *p;
203  DB_OBJLIST *super, *user;
204  int count, i;
205  char **strs;
206  const char *kludge;
207  int is_class = 0;
208  SM_CLASS *subclass;
209  bool include_inherited;
210  bool force_print_att_coll = false;
211  bool has_comment = false;
212  int max_name_size = SM_MAX_IDENTIFIER_LENGTH + 50;
213  size_t buf_size = 0;
214  object_printer printer (sb);
215 
216  include_inherited = (prt_type == CSQL_SCHEMA_COMMAND);
217 
218  is_class = locator_is_class (op, DB_FETCH_READ);
219  if (is_class < 0)
220  {
221  return ER_FAILED;
222  }
223  if (!is_class || locator_is_root (op))
224  {
226  return ER_FAILED;
227  }
228 
229  int err = au_fetch_class (op, &class_, AU_FETCH_READ, AU_SELECT);
230  if (err != NO_ERROR)
231  {
232  return err;
233  }
234  if (class_->comment != NULL && class_->comment[0] != '\0')
235  {
236  has_comment = true;
238  }
239 
240  force_print_att_coll = (class_->collation_id != LANG_SYS_COLLATION) ? true : false;
241  /* make sure all the information is up to date */
242  if (sm_clean_class (op, class_) != NO_ERROR)
243  {
244  return ER_FAILED;
245  }
246 
247  if (prt_type == CSQL_SCHEMA_COMMAND)
248  {
249  /*
250  * For the case of "print schema",
251  * this->name is set to:
252  * exact class name
253  * + COLLATE collation_name if exists;
254  * + COMMENT 'text' if exists;
255  *
256  * The caller uses this->name to fill in "<Class Name> $name"
257  */
258  if (class_->collation_id == LANG_SYS_COLLATION)
259  {
260  sb.clear ();
261  if (has_comment)
262  {
263  sb ("%-20s ", (char *) sm_ch_name ((MOBJ) class_));
264  printer.describe_comment (class_->comment);
265  }
266  else
267  {
268  sb ("%s", (char *) sm_ch_name ((MOBJ) class_));
269  }
270  }
271  else
272  {
273  if (has_comment)
274  {
275  sb ("%-20s COLLATE %s ", sm_ch_name ((MOBJ) class_), lang_get_collation_name (class_->collation_id));
276  printer.describe_comment (class_->comment);
277  }
278  else
279  {
280  sb ("%-20s COLLATE %s", sm_ch_name ((MOBJ) class_), lang_get_collation_name (class_->collation_id));
281  }
282  }
283  this->name = object_print::copy_string (sb.get_buffer ());
284  }
285  else
286  {
287  /*
288  * For the case prt_type == OBJ_PRINT_SHOW_CREATE_TABLE
289  * this->name is set to the exact class name
290  */
291  sb.clear ();
292  sb ("[%s]", sm_ch_name ((MOBJ) class_));
293  this->name = object_print::copy_string (sb.get_buffer ());
294  }
295 
296  switch (class_->class_type)
297  {
298  default:
301  break;
302  case SM_CLASS_CT:
305  break;
306  case SM_VCLASS_CT:
309  break;
310  }
311 
313  if (this->collation == NULL)
314  {
315  return ER_FAILED;
316  }
317 
318  if (has_comment && prt_type != CSQL_SCHEMA_COMMAND)
319  {
320  /*
321  * For the case except "print schema",
322  * comment is copied to this->comment anyway
323  */
324  this->comment = object_print::copy_string (class_->comment);
325  if (this->comment == NULL)
326  {
327  return ER_FAILED;
328  }
329  }
330 
331  if (class_->inheritance != NULL)
332  {
333  count = ws_list_length ((DB_LIST *) class_->inheritance);
334  buf_size = sizeof (char *) * (count + 1);
335 
336  strs = (char **) malloc (buf_size);
337  if (strs == NULL)
338  {
340  return ER_FAILED;
341  }
342 
343  i = 0;
344  for (super = class_->inheritance; super != NULL; super = super->next)
345  {
346  /* kludge for const vs. non-const warnings */
347  kludge = sm_get_ch_name (super->op);
348  if (kludge == NULL)
349  {
350  assert (er_errid () != NO_ERROR);
351  return ER_FAILED;
352  }
353 
354  if (prt_type == CSQL_SCHEMA_COMMAND)
355  {
356  strs[i] = object_print::copy_string ((char *) kludge);
357  }
358  else
359  {
360  /* prt_type == OBJ_PRINT_SHOW_CREATE_TABLE */
361  sb.clear ();
362  sb ("[%s]", kludge);
363  strs[i] = object_print::copy_string (sb.get_buffer ());
364  }
365  i++;
366  }
367 
368  strs[i] = 0;
369  this->supers = strs;
370  }
371 
372  if (class_->users != NULL)
373  {
374  count = ws_list_length ((DB_LIST *) class_->users);
375  buf_size = sizeof (char *) * (count + 1);
376 
377  strs = (char **) malloc (buf_size);
378  if (strs == NULL)
379  {
381  return ER_FAILED;
382  }
383 
384  i = 0;
385  for (user = class_->users; user != NULL; user = user->next)
386  {
387  /* kludge for const vs. non-const warnings */
388  kludge = sm_get_ch_name (user->op);
389  if (kludge == NULL)
390  {
391  assert (er_errid () != NO_ERROR);
392  return ER_FAILED;
393  }
394 
395  if (prt_type == CSQL_SCHEMA_COMMAND)
396  {
397  strs[i] = object_print::copy_string ((char *) kludge);
398  }
399  else
400  {
401  /* prt_type == OBJ_PRINT_SHOW_CREATE_TABLE */
402  sb.clear ();
403  sb ("[%s]", kludge);
404  strs[i] = object_print::copy_string (sb.get_buffer ());
405  }
406 
407  i++;
408  }
409 
410  strs[i] = 0;
411  this->subs = strs;
412  }
413 
414  if (class_->attributes != NULL || class_->shared != NULL)
415  {
416  if (include_inherited)
417  {
418  count = class_->att_count + class_->shared_count;
419  }
420  else
421  {
422  count = 0;
423  /* find the number own by itself */
424  for (a = class_->ordered_attributes; a != NULL; a = a->order_link)
425  {
426  if (a->class_mop == op)
427  {
428  count++;
429  }
430  }
431  }
432 
433  if (count > 0)
434  {
435  buf_size = sizeof (char *) * (count + 1);
436 
437  strs = (char **) malloc (buf_size);
438  if (strs == NULL)
439  {
441  return ER_FAILED;
442  }
443 
444  i = 0;
445  for (a = class_->ordered_attributes; a != NULL; a = a->order_link)
446  {
447  if (include_inherited || (!include_inherited && a->class_mop == op))
448  {
449  sb.clear ();
450  printer.describe_attribute (*op, *a, (a->class_mop != op), prt_type, force_print_att_coll);
451  if (sb.len () == 0)
452  {
453  return ER_FAILED;
454  }
455  strs[i] = object_print::copy_string (sb.get_buffer ());
456  i++;
457  }
458  }
459 
460  strs[i] = 0;
461  this->attributes = strs;
462  }
463  }
464 
465  if (class_->class_attributes != NULL)
466  {
467  if (include_inherited)
468  {
469  count = class_->class_attribute_count;
470  }
471  else
472  {
473  count = 0;
474  /* find the number own by itself */
475  for (a = class_->class_attributes; a != NULL; a = (SM_ATTRIBUTE *) a->header.next)
476  {
477  if (a->class_mop == op)
478  {
479  count++;
480  }
481  }
482  }
483 
484  if (count > 0)
485  {
486  buf_size = sizeof (char *) * (count + 1);
487 
488  strs = (char **)malloc (buf_size);
489  if (strs == NULL)
490  {
492  return ER_FAILED;
493  }
494 
495  i = 0;
496  for (a = class_->class_attributes; a != NULL; a = (SM_ATTRIBUTE *) a->header.next)
497  {
498  if (include_inherited || (!include_inherited && a->class_mop == op))
499  {
500  sb.clear ();
501  printer.describe_attribute (*op, *a, (a->class_mop != op), prt_type, force_print_att_coll);
502  if (sb.len () == 0)
503  {
504  return ER_FAILED;
505  }
506  strs[i] = object_print::copy_string (sb.get_buffer ());
507  i++;
508  }
509  }
510 
511  strs[i] = 0;
512  this->class_attributes = strs;
513  }
514  }
515 
516  if (class_->methods != NULL)
517  {
518  if (include_inherited)
519  {
520  count = class_->method_count;
521  }
522  else
523  {
524  count = 0;
525  /* find the number own by itself */
526  for (m = class_->methods; m != NULL; m = (SM_METHOD *) m->header.next)
527  {
528  if (m->class_mop == op)
529  {
530  count++;
531  }
532  }
533  }
534 
535  if (count > 0)
536  {
537  buf_size = sizeof (char *) * (count + 1);
538 
539  strs = (char **) malloc (buf_size);
540  if (strs == NULL)
541  {
543  return ER_FAILED;
544  }
545 
546  i = 0;
547  for (m = class_->methods; m != NULL; m = (SM_METHOD *) m->header.next)
548  {
549  if (include_inherited || (!include_inherited && m->class_mop == op))
550  {
551  sb.clear ();
552  printer.describe_method (*op, *m, prt_type);
553  strs[i] = object_print::copy_string (sb.get_buffer ());
554  i++;
555  }
556  }
557 
558  strs[i] = 0;
559  this->methods = strs;
560  }
561  }
562 
563  if (class_->class_methods != NULL)
564  {
565  if (include_inherited)
566  {
567  count = class_->class_method_count;
568  }
569  else
570  {
571  count = 0;
572  /* find the number own by itself */
573  for (m = class_->class_methods; m != NULL; m = (SM_METHOD *) m->header.next)
574  {
575  if (m->class_mop == op)
576  {
577  count++;
578  }
579  }
580  }
581 
582  if (count > 0)
583  {
584  buf_size = sizeof (char *) * (count + 1);
585 
586  strs = (char **) malloc (buf_size);
587  if (strs == NULL)
588  {
590  return ER_FAILED;
591  }
592 
593  i = 0;
594  for (m = class_->class_methods; m != NULL; m = (SM_METHOD *) m->header.next)
595  {
596  if (include_inherited || (!include_inherited && m->class_mop == op))
597  {
598  sb.clear ();
599  printer.describe_method (*op, *m, prt_type);
600  strs[i] = object_print::copy_string (sb.get_buffer ());
601  i++;
602  }
603  }
604 
605  strs[i] = 0;
606  this->class_methods = strs;
607  }
608  }
609 
610  if (class_->resolutions != NULL)
611  {
612  count = ws_list_length ((DB_LIST *) class_->resolutions);
613  buf_size = sizeof (char *) * (count + 1);
614 
615  strs = (char **) malloc (buf_size);
616  if (strs == NULL)
617  {
619  return ER_FAILED;
620  }
621 
622  i = 0;
623  for (SM_RESOLUTION *r = class_->resolutions; r != NULL; r = r->next)
624  {
625  sb.clear ();
626  printer.describe_resolution (*r, prt_type);
627  strs[i] = object_print::copy_string (sb.get_buffer ());
628  i++;
629  }
630 
631  strs[i] = 0;
632  this->resolutions = strs;
633  }
634 
635  if (class_->method_files != NULL)
636  {
637  if (include_inherited)
638  {
639  count = ws_list_length ((DB_LIST *) class_->method_files);
640  }
641  else
642  {
643  count = 0;
644 
645  /* find the number own by itself */
646  for (SM_METHOD_FILE *f = class_->method_files; f != NULL; f = f->next)
647  {
648  if (f->class_mop == op)
649  {
650  count++;
651  }
652  }
653  }
654 
655  if (count > 0)
656  {
657  buf_size = sizeof (char *) * (count + 1);
658 
659  strs = (char **) malloc (buf_size);
660  if (strs == NULL)
661  {
663  return ER_FAILED;
664  }
665 
666  i = 0;
667  for (SM_METHOD_FILE *f = class_->method_files; f != NULL; f = f->next)
668  {
669  if (include_inherited || (!include_inherited && f->class_mop == op))
670  {
671  sb.clear ();
672  printer.describe_method_file (*op, *f);
673  strs[i] = object_print::copy_string (sb.get_buffer ());
674  i++;
675  }
676  }
677 
678  strs[i] = 0;
679  this->method_files = strs;
680  }
681  }
682 
683  if (class_->query_spec != NULL)
684  {
685  count = ws_list_length ((DB_LIST *) class_->query_spec);
686  buf_size = sizeof (char *) * (count + 1);
687 
688  strs = (char **) malloc (buf_size);
689  if (strs == NULL)
690  {
692  return ER_FAILED;
693  }
694 
695  i = 0;
696  for (p = class_->query_spec; p != NULL; p = p->next)
697  {
698  strs[i] = object_print::copy_string ((char *) p->specification);
699  i++;
700  }
701 
702  strs[i] = 0;
703  this->query_spec = strs;
704  }
705 
706  /* these are a bit more complicated */
707  init_triggers (*class_, *op, sb, printer, triggers);
708 
709  /*
710  * Process multi-column class constraints (Unique and Indexes).
711  * Single column constraints (NOT 0) are displayed along with
712  * the attributes.
713  */
714  this->constraints = 0; /* initialize */
715  if (class_->constraints != NULL)
716  {
718 
719  count = 0;
720  for (c = class_->constraints; c; c = c->next)
721  {
723  {
724  /* Csql schema command will print all constraints, which include the constraints belong to the table
725  * itself and belong to the parent table. But show create table will only print the constraints which
726  * belong to the table itself.
727  */
728  if (include_inherited
729  || (!include_inherited && c->attributes[0] != NULL && c->attributes[0]->class_mop == op))
730  {
731  count++;
732  }
733  }
734  }
735 
736  if (count > 0)
737  {
738  buf_size = sizeof (char *) * (count + 1);
739 
740  strs = (char **) malloc (buf_size);
741  if (strs == NULL)
742  {
744  return ER_FAILED;
745  }
746 
747  i = 0;
748  for (c = class_->constraints; c; c = c->next)
749  {
751  {
752  if (include_inherited
753  || (!include_inherited && c->attributes[0] != NULL && c->attributes[0]->class_mop == op))
754  {
755  sb.clear ();
756  printer.describe_constraint (*class_, *c, prt_type);
757  strs[i] = object_print::copy_string (sb.get_buffer ());
758  if (strs[i] == NULL)
759  {
760  this->constraints = strs;
761  return ER_FAILED;
762  }
763  i++;
764  }
765  }
766  }
767 
768  strs[i] = 0;
769  this->constraints = strs;
770  }
771  }
772 
773  //partition
774  if (class_->partition != NULL && class_->partition->pname == NULL)
775  {
776  sb.clear ();
777  printer.describe_partition_info (*class_->partition);
778  partition.push_back (object_print::copy_string (sb.get_buffer ()));
779 
780  bool is_print_partition = true;
781  count = 0;
782 
783  /* Show create table will not print the sub partition for hash partition table. */
784  if (prt_type == SHOW_CREATE_TABLE)
785  {
786  is_print_partition = (class_->partition->partition_type != PT_PARTITION_HASH);
787  }
788 
789  if (is_print_partition)
790  {
791  for (user = class_->users; user != NULL; user = user->next)
792  {
793  if (au_fetch_class (user->op, &subclass, AU_FETCH_READ, AU_SELECT) != NO_ERROR)
794  {
795  return ER_FAILED;
796  }
797  if (subclass->partition)
798  {
799  sb.clear ();
800  printer.describe_partition_parts (*subclass->partition, prt_type);
801  partition.push_back (object_print::copy_string (sb.get_buffer ()));
802  }
803  }
804  }
805  }
806 
807  return NO_ERROR;
808 }
struct tr_schema_cache * triggers
Definition: class_object.h:463
#define MSGCAT_HELP_META_CLASS_HEADER
Definition: msgcat_help.hpp:51
SM_ATTRIBUTE * shared
Definition: class_object.h:722
#define NO_ERROR
Definition: error_code.h:46
char * copy_string(const char *source)
int class_method_count
Definition: class_object.h:732
#define LANG_SYS_COLLATION
DB_OBJLIST * inheritance
Definition: class_object.h:718
std::vector< char * > partition
SM_COMPONENT header
Definition: class_object.h:591
char * MOBJ
Definition: work_space.h:174
#define ER_FAILED
Definition: error_code.h:47
int shared_count
Definition: class_object.h:723
SM_ATTRIBUTE * attributes
Definition: class_object.h:721
SM_PARTITION * partition
Definition: class_object.h:760
#define ASSERT_ERROR_AND_SET(error_code)
SM_RESOLUTION * resolutions
Definition: class_object.h:735
#define SM_MAX_IDENTIFIER_LENGTH
void describe_partition_parts(const sm_partition &parts, class_description::type prt_type)
static int class_type(DB_OBJECT *class_obj)
Definition: cas_execute.c:8143
#define MSGCAT_HELP_CLASS_HEADER
Definition: msgcat_help.hpp:52
void describe_method(const struct db_object &op, const sm_method &method_p, class_description::type prt_type)
struct sm_component * next
Definition: class_object.h:384
void describe_attribute(const struct db_object &class_p, const sm_attribute &attribute_p, bool is_inherited, class_description::type prt_type, bool force_print_collation)
const char * pname
Definition: class_object.h:694
TR_TRIGLIST * triggers[1]
#define MSGCAT_HELP_VCLASS_HEADER
Definition: msgcat_help.hpp:53
struct sm_class_constraint * next
Definition: class_object.h:530
int er_errid(void)
int collation_id
Definition: class_object.h:750
static DB_OBJECT * is_class(OID *obj_oid, OID *class_oid)
Definition: compactdb.c:637
const char * lang_get_collation_name(const int coll_id)
void describe_method_file(const struct db_object &obj, const sm_method_file &file)
int att_count
Definition: class_object.h:720
int class_attribute_count
Definition: class_object.h:724
int init(const char *name)
void describe_resolution(const sm_resolution &resolution, class_description::type prt_type)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
const char * sm_ch_name(const MOBJ clobj)
struct tr_schema_cache * triggers
Definition: class_object.h:756
#define assert(x)
int au_fetch_class(MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type)
int sm_clean_class(MOP classmop, SM_CLASS *class_)
#define ER_OUT_OF_VIRTUAL_MEMORY
Definition: error_code.h:50
struct sm_query_spec * next
Definition: class_object.h:683
int tr_validate_schema_cache(TR_SCHEMA_CACHE *cache, MOP class_mop)
SM_ATTRIBUTE * class_attributes
Definition: class_object.h:725
#define MSGCAT_SET_HELP
SM_METHOD_FILE * method_files
Definition: class_object.h:727
const char * sm_get_ch_name(MOP op)
#define NULL
Definition: freelistheap.h:34
void describe_constraint(const sm_class &class_p, const sm_class_constraint &constraint_p, class_description::type prt_type)
#define SM_IS_CONSTRAINT_INDEX_FAMILY(c)
Definition: class_object.h:117
#define err(fd,...)
Definition: porting.h:431
const char * get_buffer() const
void free_strarray(char **strs)
struct db_objlist * next
Definition: dbtype_def.h:442
int count(int &result, const cub_regex_object &reg, const std::string &src, const int position, const INTL_CODESET codeset)
#define MSGCAT_CATALOG_CUBRID
SM_METHOD * class_methods
Definition: class_object.h:733
size_t len() const
SM_QUERY_SPEC * query_spec
Definition: class_object.h:745
unsigned short array_length
struct db_object * op
Definition: dbtype_def.h:443
SM_CLASS_CONSTRAINT * constraints
Definition: class_object.h:757
void describe_class_trigger(const tr_trigger &trigger)
void describe_comment(const char *comment)
#define AU_SELECT
Definition: authenticate.h:69
#define ARG_FILE_LINE
Definition: error_manager.h:44
int method_count
Definition: class_object.h:731
SM_COMPONENT header
Definition: class_object.h:441
#define ER_OBJ_INVALID_ARGUMENTS
Definition: error_code.h:275
void describe_partition_info(const sm_partition &partinfo)
SM_ATTRIBUTE ** attributes
Definition: class_object.h:533
SM_CLASS_TYPE class_type
Definition: class_object.h:713
SM_CONSTRAINT_TYPE type
Definition: class_object.h:540
const char * specification
Definition: class_object.h:685
DB_OBJLIST * users
Definition: class_object.h:712
int i
Definition: dynamic_load.c:954
char * msgcat_message(int cat_id, int set_id, int msg_id)
struct sm_attribute * order_link
Definition: class_object.h:461
int ws_list_length(DB_LIST *list)
Definition: work_space.c:3925
MOP sm_find_class(const char *name)
int locator_is_class(MOP mop, DB_FETCH_MODE hint_purpose)
Definition: locator_cl.c:239
bool locator_is_root(MOP mop)
Definition: locator_cl.c:212
#define SM_MAX_CLASS_COMMENT_LENGTH
Definition: class_object.h:149
SM_ATTRIBUTE * ordered_attributes
Definition: class_object.h:753
const char * comment
Definition: class_object.h:758
SM_METHOD * methods
Definition: class_object.h:730
const char ** p
Definition: dynamic_load.c:945