~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/name_resolution_context.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
RemoveĀ unusedĀ Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

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