CUBRID Engine  latest
view_transform.h File Reference
#include "parser.h"
#include "schema_manager.h"
Include dependency graph for view_transform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum PT_FETCH_AS PT_FETCH_AS
 
typedef enum pt_updatability PT_UPDATABILITY
 

Enumerations

enum  PT_FETCH_AS { PT_NORMAL_SELECT, PT_INVERTED_ASSIGNMENTS, PT_PARTIAL_SELECT }
 
enum  pt_updatability { PT_NOT_UPDATABLE = 0x0, PT_PARTIALLY_UPDATABLE = 0x1, PT_UPDATABLE = 0x3 }
 

Functions

PT_NODEmq_bump_correlation_level (PARSER_CONTEXT *parser, PT_NODE *node, int increment, int match)
 
PT_UPDATABILITY mq_updatable (PARSER_CONTEXT *parser, PT_NODE *statement)
 
PT_NODEmq_translate (PARSER_CONTEXT *parser, PT_NODE *volatile node)
 
PT_NODEmq_make_derived_spec (PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE *subquery, int *idx, PT_NODE **spec_ptr, PT_NODE **attr_list_ptr)
 
PT_NODEmq_oid (PARSER_CONTEXT *parser, PT_NODE *spec)
 
PT_NODEmq_get_references (PARSER_CONTEXT *parser, PT_NODE *statement, PT_NODE *spec)
 
PT_NODEmq_get_references_helper (PARSER_CONTEXT *parser, PT_NODE *statement, PT_NODE *spec, bool get_spec_referenced_attr)
 
PT_NODEmq_reset_paths (PARSER_CONTEXT *parser, PT_NODE *statement, PT_NODE *root_spec)
 
PT_NODEmq_reset_ids (PARSER_CONTEXT *parser, PT_NODE *statement, PT_NODE *spec)
 
PT_NODEmq_clear_ids (PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE *spec)
 
PT_NODEmq_set_references (PARSER_CONTEXT *parser, PT_NODE *statement, PT_NODE *spec)
 
bool mq_is_outer_join_spec (PARSER_CONTEXT *parser, PT_NODE *spec)
 
bool mq_is_updatable (DB_OBJECT *vclass_object)
 
bool mq_is_updatable_strict (DB_OBJECT *vclass_object)
 
bool mq_is_updatable_attribute (DB_OBJECT *vclass, const char *attr_name, DB_OBJECT *base_class)
 
bool mq_is_updatable_att (PARSER_CONTEXT *parser, DB_OBJECT *vmop, const char *attr_name, DB_OBJECT *rmop)
 
int mq_get_attribute (DB_OBJECT *vclass, const char *attr_name, DB_OBJECT *base_class, DB_VALUE *virtual_value, DB_OBJECT *base_instance)
 
int mq_update_attribute (DB_OBJECT *vclass, const char *attr_name, DB_OBJECT *base_class, DB_VALUE *virtual_value, DB_VALUE *base_value, const char **base_name, int db_auth)
 
DB_OBJECTmq_fetch_one_real_class (DB_OBJECT *vclass)
 
int mq_evaluate_expression (PARSER_CONTEXT *parser, PT_NODE *expr, DB_VALUE *value, DB_OBJECT *object, UINTPTR spec_id)
 
int mq_evaluate_expression_having_serial (PARSER_CONTEXT *parser, PT_NODE *expr, DB_VALUE *values, int values_count, DB_OBJECT *object, UINTPTR spec_id)
 
int mq_evaluate_check_option (PARSER_CONTEXT *parser, PT_NODE *expr, DB_OBJECT *object, PT_NODE *view_class)
 
int mq_get_expression (DB_OBJECT *object, const char *expr, DB_VALUE *value)
 
PT_NODEmq_reset_ids_in_statement (PARSER_CONTEXT *parser, PT_NODE *statement)
 
PT_NODEmq_reset_ids_in_methods (PARSER_CONTEXT *parser, PT_NODE *statement)
 
PT_NODEmq_rewrite_aggregate_as_derived (PARSER_CONTEXT *parser, PT_NODE *agg_sel)
 
PT_NODEmq_rewrite_query_as_derived (PARSER_CONTEXT *parser, PT_NODE *query)
 

Typedef Documentation

typedef enum PT_FETCH_AS PT_FETCH_AS

Definition at line 43 of file view_transform.h.

Enumeration Type Documentation

Enumerator
PT_NORMAL_SELECT 
PT_INVERTED_ASSIGNMENTS 
PT_PARTIAL_SELECT 

Definition at line 32 of file view_transform.h.

Enumerator
PT_NOT_UPDATABLE 
PT_PARTIALLY_UPDATABLE 
PT_UPDATABLE 

Definition at line 36 of file view_transform.h.

Function Documentation

PT_NODE* mq_bump_correlation_level ( PARSER_CONTEXT parser,
PT_NODE node,
int  increment,
int  match 
)
PT_NODE* mq_clear_ids ( PARSER_CONTEXT parser,
PT_NODE node,
PT_NODE spec 
)

Definition at line 6894 of file view_transform.c.

References pt_spec_info::id, parser_node::info, mq_clear_all_ids(), NULL, parser_walk_tree(), pt_continue_walk(), and pt_statement_info::spec.

Referenced by compile_partition_expression(), and pt_check_order_by().

Here is the caller graph for this function:

int mq_evaluate_expression_having_serial ( PARSER_CONTEXT parser,
PT_NODE expr,
DB_VALUE values,
int  values_count,
DB_OBJECT object,
UINTPTR  spec_id 
)
DB_OBJECT* mq_fetch_one_real_class ( DB_OBJECT vclass)

Definition at line 10689 of file view_transform.c.

References pt_name_info::db_object, parser_node::info, mq_fetch_one_real_class_get_cache(), pt_statement_info::name, and NULL.

Referenced by make_template(), and ws_vmop().

Here is the caller graph for this function:

PT_NODE* mq_get_references_helper ( PARSER_CONTEXT parser,
PT_NODE statement,
PT_NODE spec,
bool  get_spec_referenced_attr 
)
bool mq_is_updatable ( DB_OBJECT vclass_object)
bool mq_is_updatable_attribute ( DB_OBJECT vclass,
const char *  attr_name,
DB_OBJECT base_class 
)

Definition at line 10314 of file view_transform.c.

References mq_is_updatable_att(), NULL, parser, parser_create_parser(), parser_free_parser(), and rc.

Referenced by db_is_updatable_attribute(), and populate_defaults().

Here is the caller graph for this function:

bool mq_is_updatable_strict ( DB_OBJECT vclass_object)

Definition at line 10270 of file view_transform.c.

References mq_is_updatable_local(), and PT_NORMAL_SELECT.

Referenced by mq_check_non_updatable_vclass_oid().

Here is the caller graph for this function:

PT_NODE* mq_reset_ids_in_methods ( PARSER_CONTEXT parser,
PT_NODE statement 
)

Definition at line 7040 of file view_transform.c.

References mq_reset_spec_in_method_names(), NULL, and parser_walk_tree().

Referenced by mq_substitute_subquery_in_statement().

Here is the caller graph for this function:

PT_NODE* mq_reset_ids_in_statement ( PARSER_CONTEXT parser,
PT_NODE statement 
)
PT_NODE* mq_rewrite_aggregate_as_derived ( PARSER_CONTEXT parser,
PT_NODE agg_sel 
)

Definition at line 3664 of file view_transform.c.

References pt_spec_info::as_attr_list, parser_node::cannot_prepare, pt_query_info::correlation_level, parser_node::data_type, pt_agg_rewrite_info::depth, pt_agg_rewrite_info::derived_select, pt_spec_info::derived_table, pt_spec_info::derived_table_type, parser_node::flag, pt_select_info::flavor, pt_select_info::from, pt_agg_rewrite_info::from, pt_select_info::group_by, pt_select_info::having, pt_select_info::hint, pt_spec_info::id, pt_select_info::index_ls, pt_select_info::index_ss, parser_node::info, pt_query_info::is_subquery, pt_select_info::list, pt_name_info::meta_class, mq_bump_correlation_level(), mq_generate_name(), mq_rewrite_agg_names(), mq_rewrite_agg_names_post(), pt_statement_info::name, pt_agg_rewrite_info::new_from, parser_node::next, NULL, pt_select_info::ordered, pt_name_info::original, parser_append_node(), parser_copy_tree(), parser_new_node(), parser_walk_tree(), PT_HINT_NONE, PT_INTERNAL_ERROR, PT_IS_SUBQUERY, pt_name(), PT_NORMAL, pt_pointer_stack_pop(), pt_pointer_stack_push(), pt_resolve_star(), PT_SELECT, PT_SELECT_INFO_CLEAR_FLAG, PT_SELECT_INFO_HAS_AGG, PT_SELECT_INFO_SET_FLAG, PT_SPEC, PT_USER_SELECT, pt_query_info::q, pt_statement_info::query, pt_spec_info::range_var, pt_name_info::resolved, pt_query_info::select, pt_agg_rewrite_info::select_stack, find_id_info::spec, pt_statement_info::spec, pt_name_info::spec_id, parser_node::type_enum, pt_select_info::use_idx, pt_select_info::use_merge, pt_select_info::use_nl, pt_select_info::using_index, and pt_select_info::where.

Referenced by mq_translate_local(), mq_translate_select(), and pt_check_order_by().

Here is the caller graph for this function:

PT_NODE* mq_set_references ( PARSER_CONTEXT parser,
PT_NODE statement,
PT_NODE spec 
)
PT_UPDATABILITY mq_updatable ( PARSER_CONTEXT parser,
PT_NODE statement 
)

Definition at line 1184 of file view_transform.c.

References max, MAX_STACK_OBJECTS, and mq_updatable_local().

Referenced by db_compile_statement_local(), and mq_virtual_queries().

Here is the caller graph for this function: