Drizzled Public API Documentation

drizzled::Name_resolution_context Class Reference

#include <name_resolution_context.h>

Inheritance diagram for drizzled::Name_resolution_context:
drizzled::memory::SqlAlloc

List of all members.

Public Member Functions

void init ()
void resolve_in_table_list_only (TableList *tables)

Static Public Member Functions

static void * operator new (size_t size)
static void * operator new (size_t size, Root &root)
static void * operator new (size_t size, Root *root)
static void * operator new[] (size_t size)
static void * operator new[] (size_t size, Root &root)
static void * operator new[] (size_t size, Root *root)
static void operator delete (void *)
static void operator delete (void *, Root &)
static void operator delete (void *, Root *)
static void operator delete[] (void *)
static void operator delete[] (void *, Root &)
static void operator delete[] (void *, Root *)

Public Attributes

Name_resolution_contextouter_context
TableListtable_list
TableListfirst_name_resolution_table
TableListlast_name_resolution_table
Select_Lex * select_lex
bool resolve_in_select_list
SecurityContext * security_ctx

Detailed Description

Instances of Name_resolution_context store the information necesary for name resolution of Items and other context analysis of a query made in fix_fields().

This structure is a part of Select_Lex, a pointer to this structure is assigned when an item is created (which happens mostly during parsing (sql_yacc.yy)), but the structure itself will be initialized after parsing is complete

Todo:

Move subquery of INSERT ... SELECT and CREATE ... SELECT to separate Select_Lex which allow to remove tricks of changing this structure before and after INSERT/CREATE and its SELECT to make correct field name resolution.

Definition at line 43 of file name_resolution_context.h.


Member Data Documentation

TableList* drizzled::Name_resolution_context::first_name_resolution_table

In most cases the two table references below replace 'table_list' above for the purpose of name resolution. The first and last name resolution table references allow us to search only in a sub-tree of the nested join tree in a FROM clause. This is needed for NATURAL JOIN, JOIN ... USING and JOIN ... ON.

Definition at line 68 of file name_resolution_context.h.

Referenced by drizzled::Item_field::fix_after_pullout(), drizzled::Item_insert_value::fix_fields(), drizzled::Item_field::fix_fields(), drizzled::Item_field::fix_outer_field(), and drizzled::insert_query().

TableList* drizzled::Name_resolution_context::last_name_resolution_table

Last table to search in the list of leaf table references that begins with first_name_resolution_table.

Definition at line 73 of file name_resolution_context.h.

Referenced by drizzled::Item_field::fix_after_pullout(), drizzled::Item_insert_value::fix_fields(), drizzled::Item_field::fix_fields(), and drizzled::Item_field::fix_outer_field().

Name_resolution_context* drizzled::Name_resolution_context::outer_context

The name resolution context to search in when an Item cannot be resolved in this context (the context of an outer select)

Definition at line 50 of file name_resolution_context.h.

Referenced by drizzled::Item_field::fix_after_pullout(), drizzled::Item_ref::fix_fields(), and drizzled::Item_field::fix_outer_field().

bool drizzled::Name_resolution_context::resolve_in_select_list

When true items are resolved in this context both against the SELECT list and this->table_list. If false, items are resolved only against this->table_list.

Definition at line 87 of file name_resolution_context.h.

Referenced by drizzled::Item_ref::fix_fields().

SecurityContext* drizzled::Name_resolution_context::security_ctx

Security context of this name resolution context. It's used for views and is non-zero only if the view is defined with SQL SECURITY DEFINER.

Definition at line 93 of file name_resolution_context.h.

Select_Lex* drizzled::Name_resolution_context::select_lex

Select_Lex item belong to, in case of merged VIEW it can differ from Select_Lex where item was created, so we can't use table_list/field_list from there

Definition at line 80 of file name_resolution_context.h.

Referenced by drizzled::Item_field::fix_after_pullout(), drizzled::Item_field::fix_fields(), drizzled::Item_ref::fix_fields(), and drizzled::Item_field::fix_outer_field().

TableList* drizzled::Name_resolution_context::table_list

List of tables used to resolve the items of this context. Usually these are tables from the FROM clause of SELECT statement. The exceptions are INSERT ... SELECT and CREATE ... SELECT statements, where SELECT subquery is not moved to a separate Select_Lex. For these types of statements we have to change this member dynamically to ensure correct name resolution of different parts of the statement.

Definition at line 60 of file name_resolution_context.h.

Referenced by drizzled::insert_query().


The documentation for this class was generated from the following file: