~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/create.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-05 09:52:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110705095228-y4aejvsuyeezloqe
Refactor Items

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/item/func.h>
25
25
#include <drizzled/plugin/function.h>
26
26
 
27
 
namespace drizzled
28
 
{
 
27
namespace drizzled {
29
28
 
30
29
/**
31
30
  Public function builder interface.
65
64
  virtual Item *create(Session *session, LEX_STRING name, List<Item> *item_list) = 0;
66
65
 
67
66
protected:
68
 
  /** Constructor */
69
 
  Create_func() {}
70
 
  /** Destructor */
71
67
  virtual ~Create_func() {}
72
68
};
73
69
 
99
95
    @param item_list The list of arguments to the function, can be NULL
100
96
    @return An item representing the parsed function call
101
97
  */
102
 
  virtual Item* create(Session *session, LEX_STRING db, LEX_STRING name,
103
 
                       bool use_explicit_name, List<Item> *item_list) = 0;
104
 
 
105
 
protected:
106
 
  /** Constructor. */
107
 
  Create_qfunc() {}
108
 
  /** Destructor. */
109
 
  virtual ~Create_qfunc() {}
 
98
  virtual Item* create(Session*, LEX_STRING db, LEX_STRING name, bool use_explicit_name, List<Item>*) = 0;
110
99
};
111
100
 
112
101
 
115
104
  @param name The native function name
116
105
  @return The native function builder associated with the name, or NULL
117
106
*/
118
 
extern Create_func * find_native_function_builder(LEX_STRING name);
 
107
extern Create_func* find_native_function_builder(LEX_STRING name);
119
108
 
120
109
 
121
110
/**
123
112
  @param session The current thread
124
113
  @return A function builder for qualified functions
125
114
*/
126
 
extern Create_qfunc * find_qualified_function_builder(Session *session);
 
115
extern Create_qfunc* find_qualified_function_builder(Session*);
127
116
 
128
117
 
129
118
/**
142
131
    @param item_list The list of arguments to the function, can be NULL
143
132
    @return An item representing the parsed function call
144
133
  */
145
 
  Item *create(Session *session,
146
 
               const plugin::Function *fct,
147
 
               List<Item> *item_list);
 
134
  Item *create(Session *session, const plugin::Function *fct, List<Item> *item_list);
148
135
 
149
136
  /** Singleton. */
150
137
  static Create_udf_func s_singleton;
152
139
protected:
153
140
  /** Constructor. */
154
141
  Create_udf_func() {}
155
 
  /** Destructor. */
156
 
  virtual ~Create_udf_func() {}
157
142
};
158
143
 
159
144
Item*
169
154
  @param cs The character set
170
155
*/
171
156
Item *
172
 
create_func_cast(Session *session, Item *a, Cast_target cast_type,
173
 
                 const char *len, const char *dec,
174
 
                 const charset_info_st * const cs);
 
157
create_func_cast(Session*, Item *a, Cast_target cast_type, const char *len, const char *dec, const charset_info_st*);
175
158
 
176
159
void item_create_init();
177
160
void item_create_cleanup();