CUBRID Engine  latest
query_result.c File Reference
#include "config.h"
#include "authenticate.h"
#include "misc_string.h"
#include "error_manager.h"
#include "parser.h"
#include "parser_message.h"
#include "server_interface.h"
#include "db_query.h"
#include "object_accessor.h"
#include "schema_manager.h"
#include "memory_alloc.h"
#include "execute_statement.h"
#include "xasl_generation.h"
#include "object_primitive.h"
#include "db.h"
#include "network_interface_cl.h"
#include "transaction_cl.h"
#include "dbtype.h"
Include dependency graph for query_result.c:

Go to the source code of this file.

Functions

static int pt_find_size_from_dbtype (const DB_TYPE T_type)
 
static int pt_arity_of_query_type (const DB_QUERY_TYPE *qt)
 
static char * pt_get_attr_name (PARSER_CONTEXT *parser, PT_NODE *node)
 
static DB_COL_TYPE pt_get_col_type (const PARSER_CONTEXT *parser, const PT_NODE *node)
 
static void pt_set_domain_class (SM_DOMAIN *dom, const PT_NODE *nam, const DB_OBJECT *virt)
 
static void pt_set_domain_class_list (SM_DOMAIN *dom, const PT_NODE *nam, const DB_OBJECT *virt)
 
static SM_DOMAINpt_get_src_domain (PARSER_CONTEXT *parser, const PT_NODE *s, const PT_NODE *specs)
 
static DB_QUERY_TYPEpt_get_node_title (PARSER_CONTEXT *parser, const PT_NODE *col, const PT_NODE *from_list)
 
static PT_NODEpt_get_from_list (const PARSER_CONTEXT *parser, const PT_NODE *query)
 
static void pt_fixup_select_columns_type (PT_NODE *columns)
 
void pt_report_to_ersys (const PARSER_CONTEXT *parser, const PT_ERROR_TYPE error_type)
 
void pt_report_to_ersys_with_statement (PARSER_CONTEXT *parser, const PT_ERROR_TYPE error_type, PT_NODE *statement)
 
PT_NODEpt_get_select_list (PARSER_CONTEXT *parser, PT_NODE *query)
 
DB_QUERY_TYPEpt_get_titles (PARSER_CONTEXT *parser, PT_NODE *query)
 
DB_QUERY_TYPEpt_fillin_type_size (PARSER_CONTEXT *parser, PT_NODE *query, DB_QUERY_TYPE *list, const int oids_included, bool want_spec_entity_name, bool fixup_columns_type)
 
DB_QUERY_RESULTpt_new_query_result_descriptor (PARSER_CONTEXT *parser, PT_NODE *query)
 
DB_QUERY_RESULTpt_make_cache_hit_result_descriptor (void)
 
void pt_free_query_etc_area (PARSER_CONTEXT *parser, PT_NODE *query)
 
void pt_end_query (PARSER_CONTEXT *parser, QUERY_ID query_id_self)
 
int db_object_describe (DB_OBJECT *obj_mop, int num_attrs, const char **attrs, DB_QUERY_TYPE **col_spec)
 
int db_object_fetch (DB_OBJECT *obj_mop, int num_attrs, const char **attrs, DB_QUERY_RESULT **result)
 
DB_ATTRIBUTEdb_get_attribute_force (DB_OBJECT *obj, const char *name)
 
DB_ATTRIBUTEdb_get_attributes_force (DB_OBJECT *obj)
 
DB_OBJECTpt_find_users_class (PARSER_CONTEXT *parser, PT_NODE *name)
 
int pt_is_server_insert_with_generated_keys (PARSER_CONTEXT *parser, PT_NODE *statement)
 

Function Documentation

int db_object_describe ( DB_OBJECT obj_mop,
int  num_attrs,
const char **  attrs,
DB_QUERY_TYPE **  col_spec 
)
static int pt_arity_of_query_type ( const DB_QUERY_TYPE qt)
static

Definition at line 89 of file query_result.c.

References db_query_type::next.

Referenced by pt_fillin_type_size().

Here is the caller graph for this function:

static int pt_find_size_from_dbtype ( const DB_TYPE  T_type)
static

Definition at line 64 of file query_result.c.

References DB_TYPE_NULL, pr_mem_size(), pr_type_from_id(), and pr_type::variable_p.

Referenced by db_object_describe(), db_object_fetch(), and pt_fillin_type_size().

Here is the caller graph for this function:

static void pt_fixup_select_columns_type ( PT_NODE columns)
static

Definition at line 624 of file query_result.c.

References parser_node::next, NULL, and pt_fixup_column_type().

Referenced by pt_fillin_type_size().

Here is the caller graph for this function:

void pt_free_query_etc_area ( PARSER_CONTEXT parser,
PT_NODE query 
)
static char * pt_get_attr_name ( PARSER_CONTEXT parser,
PT_NODE node 
)
static

Definition at line 110 of file query_result.c.

References parser_context::custom_print, parser_node::node_type, NULL, parser_print_tree(), pt_get_end_path_node(), PT_NAME, PT_SUPPRESS_RESOLVED, PT_SUPPRESS_SELECTOR, and strdup().

Referenced by pt_get_node_title().

Here is the caller graph for this function:

static PT_NODE * pt_get_from_list ( const PARSER_CONTEXT parser,
const PT_NODE query 
)
static
PT_NODE* pt_get_select_list ( PARSER_CONTEXT parser,
PT_NODE query 
)

Definition at line 404 of file query_result.c.

References parser_node::alias_print, pt_union_info::arg1, pt_union_info::arg2, assert, parser_node::data_type, db_make_null(), pt_value_info::db_value, EXCLUDE_HIDDEN_COLUMNS, parser_node::flag, parser_context::id, INCLUDE_HIDDEN_COLUMNS, parser_node::info, parser_node::is_hidden_column, pt_node_list_info::list, pt_select_info::list, MSGCAT_SEMANTIC_ARITY_MISMATCH, MSGCAT_SET_PARSER_SEMANTIC, parser_node::next, pt_statement_info::node_list, parser_node::node_type, NULL, parser_copy_tree_list(), parser_free_tree(), parser_node::parser_id, pt_append_string(), pt_common_type(), PT_DIFFERENCE, PT_ERRORmf2, PT_INTERSECTION, PT_IS_COMPLEX_TYPE, PT_IS_PARAMETERIZED_TYPE, pt_is_value_node, pt_length_of_select_list(), PT_NAME, PT_NODE_LIST, PT_SELECT, PT_TYPE_ENUMERATION, PT_TYPE_NA, PT_TYPE_NONE, PT_TYPE_NULL, PT_TYPE_STAR, PT_UNION, PT_VALUE, pt_query_info::q, pt_statement_info::query, pt_query_info::select, pt_union_info::select_list, parser_node::type_enum, pt_query_info::union_, and pt_statement_info::value.

Referenced by db_get_query_type_list(), insert_subquery_results(), mq_make_derived_spec(), mq_rewrite_query_as_derived(), pt_add_oid_to_select_list(), pt_append_odku_references(), pt_apply_union_select_list_collation(), pt_check_assignments(), pt_check_create_entity(), pt_check_create_view(), pt_check_default_vclass_query_spec(), pt_check_into_clause(), pt_check_union_compatibility(), pt_check_union_type_compatibility_of_values_query(), pt_check_vclass_query_spec(), pt_check_vclass_union_spec(), pt_check_with_clause(), pt_coerce_insert_values(), pt_coerce_range_expr_arguments(), pt_eval_function_type_old(), pt_fillin_type_size(), pt_get_attr_list_of_derived_table(), pt_get_one_tuple_from_list_id(), pt_get_select_list_coll_compat(), pt_get_titles(), pt_make_aptr_parent_node(), pt_new_query_result_descriptor(), pt_semantic_check_local(), pt_set_attr_list_types(), pt_set_orderby_for_sort_limit_plan(), pt_set_table_to_db(), pt_to_after_groupby(), pt_to_after_iscan(), pt_to_compatible_cast(), pt_to_groupby(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_orderby(), pt_to_outlist(), pt_to_regu_variable(), pt_try_remove_order_by(), pt_type_cast_vclass_query_spec(), pt_wrap_select_list_with_cast_op(), qo_check_iscan_for_multi_range_opt(), qo_discover_sort_limit_nodes(), qo_reduce_equality_terms(), qo_rewrite_subqueries(), and func_type::Node::set_return_type().

int pt_is_server_insert_with_generated_keys ( PARSER_CONTEXT parser,
PT_NODE statement 
)
DB_QUERY_RESULT* pt_make_cache_hit_result_descriptor ( void  )

Definition at line 1127 of file query_result.c.

References db_alloc_query_result(), db_init_query_result(), NULL, and T_CACHE_HIT.

Referenced by db_execute_and_keep_statement_local().

Here is the caller graph for this function:

static void pt_set_domain_class_list ( SM_DOMAIN dom,
const PT_NODE nam,
const DB_OBJECT virt 
)
static

Definition at line 219 of file query_result.c.

References assert, DB_TYPE_INTEGER, tp_domain::next, parser_node::next, parser_node::node_type, NULL, PT_NAME, pt_set_domain_class(), sm_domain_alloc(), and tp_domain_init().

Referenced by pt_get_src_domain().

Here is the caller graph for this function: