~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/name_resolution_context.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <drizzled/item.h>
23
23
 
24
 
namespace drizzled
25
 
{
26
 
 
27
 
class TableList;
28
 
class SecurityContext;
29
 
class Session;
30
 
class Select_Lex;
 
24
namespace drizzled {
31
25
 
32
26
/**
33
27
 * Instances of Name_resolution_context store the information necesary for
46
40
 * structure before and after INSERT/CREATE and its SELECT to make correct
47
41
 * field name resolution.
48
42
 */
49
 
class Name_resolution_context: public memory::SqlAlloc
 
43
class Name_resolution_context : public memory::SqlAlloc
50
44
{
51
45
public:
52
46
  /**
86
80
  Select_Lex *select_lex;
87
81
 
88
82
  /**
89
 
   * Processor of errors caused during Item name resolving, now used only to
90
 
   * hide underlying tables in errors about views (i.e. it substitute some
91
 
   * errors for views)
92
 
   */
93
 
  void (*error_processor)(Session *, void *);
94
 
  void *error_processor_data;
95
 
 
96
 
  /**
97
83
   * When true items are resolved in this context both against the
98
84
   * SELECT list and this->table_list. If false, items are resolved
99
85
   * only against this->table_list.
111
97
      outer_context(0), 
112
98
      table_list(0), 
113
99
      select_lex(0),
114
 
      error_processor_data(0),
115
100
      security_ctx(0)
116
 
    {}
 
101
  {
 
102
  }
117
103
 
118
104
  inline void init()
119
105
  {
120
106
    resolve_in_select_list= false;
121
 
    error_processor= &dummy_error_processor;
122
107
    first_name_resolution_table= NULL;
123
108
    last_name_resolution_table= NULL;
124
109
  }
128
113
    table_list= first_name_resolution_table= tables;
129
114
    resolve_in_select_list= false;
130
115
  }
131
 
 
132
 
  inline void process_error(Session *session)
133
 
  {
134
 
    (*error_processor)(session, error_processor_data);
135
 
  }
136
116
};
137
117
 
138
118
} /* namespace drizzled */