CUBRID Engine  latest
parse_evaluate.c File Reference
#include "config.h"
#include <assert.h>
#include "porting.h"
#include "error_manager.h"
#include "parser.h"
#include "cursor.h"
#include "memory_alloc.h"
#include "memory_hash.h"
#include "parser_message.h"
#include "execute_statement.h"
#include "object_domain.h"
#include "object_primitive.h"
#include "object_template.h"
#include "work_space.h"
#include "virtual_object.h"
#include "server_interface.h"
#include "arithmetic.h"
#include "parser_support.h"
#include "view_transform.h"
#include "network_interface_cl.h"
#include "transform.h"
#include "dbtype.h"

Go to the source code of this file.

Functions

static int pt_is_table_op (const PT_OP_TYPE op)
 
static PT_NODEpt_query_to_set_table (PARSER_CONTEXT *parser, PT_NODE *node)
 
static DB_VALUEpt_set_table_to_db (PARSER_CONTEXT *parser, PT_NODE *subquery_in, DB_VALUE *db_value, int is_seq)
 
static int pt_free_label (const void *key, void *data, void *args)
 
static int pt_associate_label_with_value (const char *label, DB_VALUE *val)
 
static void pt_evaluate_tree_internal (PARSER_CONTEXT *parser, PT_NODE *tree, DB_VALUE *db_values, int values_count, bool having_serial)
 
bool pt_eval_path_expr (PARSER_CONTEXT *parser, PT_NODE *tree, DB_VALUE *val)
 
int pt_get_one_tuple_from_list_id (PARSER_CONTEXT *parser, PT_NODE *tree, DB_VALUE *vals, int cnt)
 
int pt_associate_label_with_value_check_reference (const char *label, DB_VALUE *val)
 
int pt_is_reference_to_reusable_oid (DB_VALUE *val)
 
DB_VALUEpt_find_value_of_label (const char *label)
 
int do_drop_variable (PARSER_CONTEXT *parser, PT_NODE *stmt)
 
void pt_free_label_table (void)
 
void parser_final (void)
 
void pt_evaluate_tree (PARSER_CONTEXT *parser, PT_NODE *tree, DB_VALUE *db_values, int values_count)
 
void pt_evaluate_tree_having_serial (PARSER_CONTEXT *parser, PT_NODE *tree, DB_VALUE *db_value, int vals_cnt)
 

Variables

static MHT_TABLEpt_Label_table = NULL
 

Function Documentation

void parser_final ( void  )

Definition at line 884 of file parse_evaluate.c.

References pt_final_packing_buf(), and pt_free_label_table().

Referenced by boot_client_all_finalize().

Here is the caller graph for this function:

void pt_evaluate_tree_internal ( PARSER_CONTEXT parser,
PT_NODE tree,
DB_VALUE db_values,
int  values_count,
bool  having_serial 
)
static

Definition at line 917 of file parse_evaluate.c.

References pt_expr_info::arg1, pt_expr_info::arg2, pt_expr_info::arg3, ARG_FILE_LINE, pt_function_info::arg_list, assert, cursor_free_self_list_id, cursor_get_tuple_value(), pt_tuple_value_info::cursor_p, parser_node::data_type, db_error_string(), db_get_int(), db_get_set(), db_get_string_codeset(), db_get_string_collation(), db_identifier(), DB_IS_NULL, db_make_multiset(), db_make_null(), db_make_sequence(), db_make_set(), db_make_varchar(), db_make_varnchar(), db_seq_create(), db_set_create_basic(), db_set_create_multi(), db_value_clear(), db_value_clone(), db_value_free(), do_call_method(), do_get_serial_cached_num(), do_insert(), do_select(), db_value::domain, ER_DB_NO_MODIFICATIONS, ER_DO_INSERT_TOO_MANY, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_msg(), ER_QPROC_CANNOT_FETCH_SERIAL, ER_QPROC_CANNOT_UPDATE_SERIAL, ER_QPROC_DB_SERIAL_NOT_FOUND, ER_QPROC_SERIAL_ALREADY_EXIST, ER_QPROC_SERIAL_RANGE_OVERFLOW, er_set(), error(), parser_node::etc, pt_statement_info::expr, F_MULTISET, F_SEQUENCE, F_SET, F_TABLE_MULTISET, F_TABLE_SEQUENCE, F_TABLE_SET, pt_statement_info::function, pt_function_info::function_type, db_domain_info::general_info, GENERATE_SERIAL, pt_tuple_value_info::index, parser_node::info, pt_statement_info::insert, pt_statement_info::insert_value, pt_insert_value_info::is_evaluated, LANG_SYS_CODESET, LANG_SYS_COLLATION, mq_translate(), MSGCAT_RUNTIME__CAN_NOT_EVALUATE, MSGCAT_SEMANTIC_OUT_OF_MEMORY, MSGCAT_SEMANTIC_SERIAL_ALREADY_EXIST, MSGCAT_SEMANTIC_SERIAL_IO_ERROR, MSGCAT_SEMANTIC_SERIAL_NOT_DEFINED, MSGCAT_SEMANTIC_SERIAL_NUM_ALLOC_INVALID, MSGCAT_SEMANTIC_SERIAL_VALUE_OVERFLOW, MSGCAT_SET_ERROR, MSGCAT_SET_PARSER_RUNTIME, MSGCAT_SET_PARSER_SEMANTIC, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_expr_info::op, parser_node::or_next, pt_name_info::original, pt_insert_value_info::original_node, parser_copy_tree(), parser_free_tree(), parser_new_node(), pr_clear_value(), pr_clone_value(), pr_free_ext_value(), PT_ASSIGN, PT_BETWEEN, PT_CURRENT_VALUE, pt_db_to_type_enum(), PT_DIFFERENCE, PT_DOT_, pt_end_query(), PT_EQ, PT_ERRORc, PT_ERRORm, PT_ERRORmf, pt_eval_path_expr(), pt_evaluate_db_value_expr(), pt_evaluate_function(), pt_evaluate_tree(), pt_evaluate_tree_having_serial(), PT_EXISTS, PT_EXPR, PT_EXTRACT, PT_FROM_UNIXTIME, PT_FUNCTION, PT_FUNCTION_HOLDER, pt_get_one_tuple_from_list_id(), pt_has_error, PT_HOST_VAR, PT_INSERT, PT_INSERT_VALUE, PT_INTERNAL_ERROR, PT_INTERSECTION, pt_is_between_range_op(), pt_is_table_op(), PT_LIKE_ESCAPE, PT_LPAD, PT_LTRIM, PT_METHOD_CALL, PT_NAME, PT_NEXT_VALUE, pt_node_to_db_domain(), PT_NOT_BETWEEN, PT_OR, pt_query_to_set_table(), PT_REPLACE, pt_resolve_serial(), PT_RPAD, PT_RTRIM, PT_SELECT, pt_seq_value_to_db(), pt_set_table_to_db(), pt_set_value_to_db(), pt_short_print(), PT_SUBSTRING, PT_TRANSLATE, PT_TRIM, PT_TUPLE_VALUE, PT_TYPE_LOGICAL, PT_TYPE_NCHAR, PT_TYPE_VARCHAR, PT_TYPE_VARNCHAR, PT_UNION, PT_UNIX_TIMESTAMP, PT_VALUE, pt_value_to_db(), pt_expr_info::qualifier, parser_context::query_id, serial_get_current_value(), serial_get_next_value(), parser_context::sys_datetime, tp_domain_cache(), pt_statement_info::tuple_value, db_domain_info::general_info::type, parser_node::type_enum, pt_insert_value_info::value, and pt_insert_info::value_clauses.

Referenced by pt_evaluate_tree(), and pt_evaluate_tree_having_serial().

Here is the caller graph for this function:

static int pt_free_label ( const void *  key,
void *  data,
void *  args 
)
static

Definition at line 842 of file parse_evaluate.c.

References db_get_object(), DB_TYPE_OBJECT, db_value_free(), DB_VALUE_TYPE, NO_ERROR, NULL, ws_free_string(), and ws_remove_label_value_from_mop().

Referenced by do_drop_variable(), and pt_free_label_table().

Here is the caller graph for this function:

void pt_free_label_table ( void  )

Definition at line 867 of file parse_evaluate.c.

References mht_destroy(), mht_map(), NULL, and pt_free_label().

Referenced by parser_final().

Here is the caller graph for this function:

static int pt_is_table_op ( const PT_OP_TYPE  op)
static

Definition at line 73 of file parse_evaluate.c.

References PT_EQ_ALL, PT_EQ_SOME, PT_GE_ALL, PT_GE_SOME, PT_GT_ALL, PT_GT_SOME, PT_IS_IN, PT_IS_NOT_IN, PT_LE_ALL, PT_LE_SOME, PT_LT_ALL, PT_LT_SOME, PT_NE_ALL, and PT_NE_SOME.

Referenced by pt_evaluate_tree_internal().

Here is the caller graph for this function:

Variable Documentation

MHT_TABLE* pt_Label_table = NULL
static

Definition at line 52 of file parse_evaluate.c.