drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled/item/create.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008 Sun Microsystems, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20/* Functions to create an item. Used by sql/sql_yacc.yy */
21
22#pragma once
23
24#include <drizzled/item/func.h>
25#include <drizzled/plugin/function.h>
26
27namespace drizzled {
28
39
41{
42public:
61 virtual Item *create(Session*, str_ref name, List<Item> *item_list) = 0;
62
63protected:
64 virtual ~Create_func() {}
65};
66
72
74{
75public:
84 virtual Item *create(Session*, str_ref name, List<Item> *item_list);
85
95 virtual Item* create(Session*, str_ref db, str_ref name, bool use_explicit_name, List<Item>*) = 0;
96};
97
98
104extern Create_func* find_native_function_builder(str_ref name);
105
106
113
114
118
120{
121public:
122 virtual Item *create(Session*, str_ref name, List<Item> *item_list);
123
131 Item *create(Session*, const plugin::Function *fct, List<Item> *item_list);
132
135
136protected:
139};
140
141Item*
142create_func_char_cast(Session*, Item *a, int len, const charset_info_st * const cs);
143
153Item *
154create_func_cast(Session*, Item *a, Cast_target cast_type, const char *len, const char *dec, const charset_info_st*);
155
156void item_create_init();
157void item_create_cleanup();
158
159} /* namespace drizzled */
160
virtual Item * create(Session *, str_ref name, List< Item > *item_list)=0
virtual Item * create(Session *, str_ref name, List< Item > *item_list)
virtual Item * create(Session *, str_ref db, str_ref name, bool use_explicit_name, List< Item > *)=0
virtual Item * create(Session *, str_ref name, List< Item > *item_list)
static Create_udf_func s_singleton
TODO: Rename this file - func.h is stupid.
Item * create_func_cast(Session *session, Item *a, Cast_target cast_type, const char *c_len, const char *c_dec, const charset_info_st *const cs)
Create_qfunc * find_qualified_function_builder(Session *)
Create_func * find_native_function_builder(str_ref name)