~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/func.h

  • Committer: Monty Taylor
  • Date: 2010-12-27 19:58:09 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101227195809-1k7a4ge19l3u1o1h
Updated pandora-build files to version 0.171

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
 
 
21
 
 
22
20
#ifndef DRIZZLED_FUNCTION_FUNC_H
23
21
#define DRIZZLED_FUNCTION_FUNC_H
24
22
 
25
23
/// TODO: Rename this file - func.h is stupid.
26
24
 
27
 
#include <drizzled/charset_info.h>
28
 
#include <drizzled/current_session.h>
29
25
#include <drizzled/item.h>
 
26
#include <drizzled/sql_list.h>
30
27
#include <drizzled/item/bin_string.h>
31
 
#include <drizzled/lex_string.h>
32
 
#include <drizzled/sql_list.h>
33
 
#include <drizzled/type/decimal.h>
34
 
 
35
 
#include "drizzled/visibility.h"
 
28
#include "drizzled/current_session.h"
36
29
 
37
30
namespace drizzled
38
31
{
39
32
 
40
 
class DRIZZLED_API Item_func :
41
 
  public Item_result_field
 
33
class Item_func :public Item_result_field
42
34
{
43
35
  Session &_session;
44
36
 
75
67
 
76
68
  Item_func(void):
77
69
    _session(*current_session),
78
 
    allowed_arg_cols(1), arg_count(0),
79
 
    const_item_cache(false)
 
70
    allowed_arg_cols(1), arg_count(0)
80
71
  {
81
72
    with_sum_func= 0;
82
73
    collation.set(DERIVATION_SYSCONST);
84
75
 
85
76
  Item_func(Item *a):
86
77
    _session(*current_session),
87
 
    allowed_arg_cols(1), arg_count(1),
88
 
    const_item_cache(false)
 
78
    allowed_arg_cols(1), arg_count(1)
89
79
  {
90
80
    args= tmp_arg;
91
81
    args[0]= a;
95
85
  
96
86
  Item_func(Item *a,Item *b):
97
87
    _session(*current_session),
98
 
    allowed_arg_cols(1), arg_count(2),
99
 
    const_item_cache(false)
 
88
    allowed_arg_cols(1), arg_count(2)
100
89
  {
101
90
    args= tmp_arg;
102
91
    args[0]= a; args[1]= b;
106
95
  
107
96
  Item_func(Item *a,Item *b,Item *c):
108
97
    _session(*current_session),
109
 
    allowed_arg_cols(1),
110
 
    const_item_cache(false)
 
98
    allowed_arg_cols(1)
111
99
  {
112
100
    arg_count= 0;
113
101
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*3)))
121
109
  
122
110
  Item_func(Item *a,Item *b,Item *c,Item *d):
123
111
    _session(*current_session),
124
 
    allowed_arg_cols(1),
125
 
    const_item_cache(false)
 
112
    allowed_arg_cols(1)
126
113
  {
127
114
    arg_count= 0;
128
115
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*4)))
137
124
  
138
125
  Item_func(Item *a,Item *b,Item *c,Item *d,Item* e):
139
126
    _session(*current_session),
140
 
    allowed_arg_cols(1),
141
 
    const_item_cache(false)
 
127
    allowed_arg_cols(1)
142
128
  {
143
129
    arg_count= 5;
144
130
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*5)))
197
183
  void count_real_length();
198
184
  void count_decimal_length();
199
185
 
200
 
  bool get_arg0_date(type::Time &ltime, uint32_t fuzzy_date);
201
 
  bool get_arg0_time(type::Time &ltime);
 
186
  bool get_arg0_date(type::Time *ltime, uint32_t fuzzy_date);
 
187
  bool get_arg0_time(type::Time *ltime);
202
188
 
203
189
  bool is_null();
204
190
 
205
 
  virtual bool deterministic() const
206
 
  {
207
 
    return false;
208
 
  }
209
 
 
210
191
  void signal_divide_by_null();
211
192
 
212
193
  virtual Field *tmp_table_field() { return result_field; }