CUBRID Engine  latest
semantic_check.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 /*
21  * semantic_check.h - contains semantic check prototypes
22  */
23 
24 #ifndef _SEMANTIC_CHECK_H_
25 #define _SEMANTIC_CHECK_H_
26 
27 #ident "$Id$"
28 
29 typedef enum
30 {
36 
37 extern int pt_class_assignable (PARSER_CONTEXT * parser, const PT_NODE * d_class, const PT_NODE * s_class);
38 
40 
42 
44 
46 
48 
49 extern PT_NODE *pt_semantic_check (PARSER_CONTEXT * parser, PT_NODE * statement);
50 
51 extern PT_NODE *pt_invert (PARSER_CONTEXT * parser, PT_NODE * name_expr, PT_NODE * result);
52 #if defined (ENABLE_UNUSED_FUNCTION)
53 extern PT_NODE *pt_find_attr_def (const PT_NODE * attr_def_list, const PT_NODE * name);
54 extern PT_NODE *pt_find_cnstr_def (const PT_NODE * cnstr_def_list, const PT_NODE * name);
55 #endif
56 
57 extern PT_NODE *pt_insert_entity (PARSER_CONTEXT * parser, PT_NODE * node, PT_NODE * prev_entity,
58  PT_NODE * correlation_spec);
59 extern PT_NODE *pt_find_class_of_index (PARSER_CONTEXT * parser, const char *const index_name,
60  const DB_CONSTRAINT_TYPE index_type);
61 extern int pt_has_text_domain (PARSER_CONTEXT * parser, DB_ATTRIBUTE * attribute);
62 extern PT_NODE *pt_find_order_value_in_list (PARSER_CONTEXT * parser, const PT_NODE * sort_value,
63  const PT_NODE * order_list);
64 extern bool pt_check_cast_op (PARSER_CONTEXT * parser, PT_NODE * node);
67 extern int pt_attr_check_default_cs_coll (PARSER_CONTEXT * parser, PT_NODE * attr, int default_cs, int default_coll);
69  int *continue_walk);
70 extern void pt_try_remove_order_by (PARSER_CONTEXT * parser, PT_NODE * query);
71 
73 
74 extern PT_NODE *pt_fold_union (PARSER_CONTEXT * parser, PT_NODE * union_node, STATEMENT_SET_FOLD fold_as);
75 
76 #endif /* _SEMANTIC_CHECK_H_ */
bool pt_check_cast_op(PARSER_CONTEXT *parser, PT_NODE *node)
PT_NODE * pt_semantic_quick_check_node(PARSER_CONTEXT *parser, PT_NODE **spec, PT_NODE **node)
STATEMENT_SET_FOLD
PT_NODE * pt_fold_union(PARSER_CONTEXT *parser, PT_NODE *union_node, STATEMENT_SET_FOLD fold_as)
int pt_has_text_domain(PARSER_CONTEXT *parser, DB_ATTRIBUTE *attribute)
PT_NODE * pt_insert_entity(PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE *prev_entity, PT_NODE *correlation_spec)
PT_NODE * pt_invert(PARSER_CONTEXT *parser, PT_NODE *name_expr, PT_NODE *result)
PT_NODE * pt_check_union_compatibility(PARSER_CONTEXT *parser, PT_NODE *node)
DB_CONSTRAINT_TYPE
Definition: dbtype_def.h:452
PT_NODE * pt_check_union_type_compatibility_of_values_query(PARSER_CONTEXT *parser, PT_NODE *node)
SP_PARSER_CTX * parser
bool pt_check_compatible_node_for_orderby(PARSER_CONTEXT *parser, PT_NODE *order, PT_NODE *column)
PT_NODE * pt_check_type_compatibility_of_values_query(PARSER_CONTEXT *parser, PT_NODE *node)
PT_NODE * pt_type_cast_vclass_query_spec_column(PARSER_CONTEXT *parser, PT_NODE *attr, PT_NODE *col)
PT_NODE * pt_check_odku_assignments(PARSER_CONTEXT *parser, PT_NODE *insert)
PT_NODE * pt_find_order_value_in_list(PARSER_CONTEXT *parser, const PT_NODE *sort_value, const PT_NODE *order_list)
PT_NODE * pt_check_cyclic_reference_in_view_spec(PARSER_CONTEXT *parser, PT_NODE *node, void *arg, int *continue_walk)
PT_NODE * pt_find_class_of_index(PARSER_CONTEXT *parser, const char *const index_name, const DB_CONSTRAINT_TYPE index_type)
STATEMENT_SET_FOLD pt_check_union_is_foldable(PARSER_CONTEXT *parser, PT_NODE *union_node)
PT_NODE * pt_semantic_check(PARSER_CONTEXT *parser, PT_NODE *statement)
int pt_attr_check_default_cs_coll(PARSER_CONTEXT *parser, PT_NODE *attr, int default_cs, int default_coll)
void pt_try_remove_order_by(PARSER_CONTEXT *parser, PT_NODE *query)
int pt_class_assignable(PARSER_CONTEXT *parser, const PT_NODE *d_class, const PT_NODE *s_class)