~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_timefunc.h

  • Committer: Stewart Smith
  • Date: 2008-11-07 22:58:15 UTC
  • mto: This revision was merged to the branch mainline in revision 587.
  • Revision ID: stewart@flamingspork.com-20081107225815-ie2kwpxnytpstovl
remove trailing whitespace in serialize/table

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_ITEM_TIMEFUNC_H
 
21
#define DRIZZLED_ITEM_TIMEFUNC_H
 
22
 
 
23
#include <drizzled/functions/time/weekday.h>
 
24
#include <drizzled/functions/time/str_timefunc.h>
 
25
#include <drizzled/functions/time/date.h>
 
26
#include <drizzled/functions/time/curdate.h>
 
27
#include <drizzled/functions/time/curtime.h>
 
28
#include <drizzled/functions/time/dayname.h>
 
29
#include <drizzled/functions/time/dayofmonth.h>
 
30
#include <drizzled/functions/time/dayofyear.h>
 
31
#include <drizzled/functions/time/from_days.h>
 
32
#include <drizzled/functions/time/hour.h>
 
33
#include <drizzled/functions/time/minute.h>
 
34
#include <drizzled/functions/time/month.h>
 
35
#include <drizzled/functions/time/now.h>
 
36
#include <drizzled/functions/time/quarter.h>
 
37
#include <drizzled/functions/time/period_add.h>
 
38
#include <drizzled/functions/time/period_diff.h>
 
39
#include <drizzled/functions/time/second.h>
 
40
#include <drizzled/functions/time/sysdate_local.h>
 
41
#include <drizzled/functions/time/time_to_sec.h>
 
42
#include <drizzled/functions/time/to_days.h>
 
43
#include <drizzled/functions/time/unix_timestamp.h>
 
44
#include <drizzled/functions/time/week.h>
 
45
#include <drizzled/functions/time/week_mode.h>
 
46
#include <drizzled/functions/time/year.h>
 
47
#include <drizzled/functions/time/yearweek.h>
20
48
 
21
49
/* Function items used by mysql */
22
50
 
23
 
#ifdef USE_PRAGMA_INTERFACE
24
 
#pragma interface                       /* gcc class implementation */
25
 
#endif
26
 
 
27
51
enum date_time_format_types 
28
52
29
53
  TIME_ONLY= 0, TIME_MICROSECOND, DATE_ONLY, DATE_TIME, DATE_TIME_MICROSECOND
32
56
bool get_interval_value(Item *args,interval_type int_type,
33
57
                               String *str_value, INTERVAL *interval);
34
58
 
35
 
class Item_func_period_add :public Item_int_func
36
 
{
37
 
public:
38
 
  Item_func_period_add(Item *a,Item *b) :Item_int_func(a,b) {}
39
 
  int64_t val_int();
40
 
  const char *func_name() const { return "period_add"; }
41
 
  void fix_length_and_dec() 
42
 
  { 
43
 
    max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
44
 
  }
45
 
};
46
 
 
47
 
 
48
 
class Item_func_period_diff :public Item_int_func
49
 
{
50
 
public:
51
 
  Item_func_period_diff(Item *a,Item *b) :Item_int_func(a,b) {}
52
 
  int64_t val_int();
53
 
  const char *func_name() const { return "period_diff"; }
54
 
  void fix_length_and_dec()
55
 
  { 
56
 
    decimals=0;
57
 
    max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
58
 
  }
59
 
};
60
 
 
61
 
 
62
 
class Item_func_to_days :public Item_int_func
63
 
{
64
 
public:
65
 
  Item_func_to_days(Item *a) :Item_int_func(a) {}
66
 
  int64_t val_int();
67
 
  const char *func_name() const { return "to_days"; }
68
 
  void fix_length_and_dec() 
69
 
  { 
70
 
    decimals=0; 
71
 
    max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
72
 
    maybe_null=1; 
73
 
  }
74
 
  enum_monotonicity_info get_monotonicity_info() const;
75
 
  int64_t val_int_endpoint(bool left_endp, bool *incl_endp);
76
 
};
77
 
 
78
 
 
79
 
class Item_func_dayofmonth :public Item_int_func
80
 
{
81
 
public:
82
 
  Item_func_dayofmonth(Item *a) :Item_int_func(a) {}
83
 
  int64_t val_int();
84
 
  const char *func_name() const { return "dayofmonth"; }
85
 
  void fix_length_and_dec() 
86
 
  { 
87
 
    decimals=0; 
88
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
89
 
    maybe_null=1; 
90
 
  }
91
 
};
92
 
 
93
 
 
94
 
class Item_func_month :public Item_func
95
 
{
96
 
public:
97
 
  Item_func_month(Item *a) :Item_func(a) {}
98
 
  int64_t val_int();
99
 
  double val_real()
100
 
  { assert(fixed == 1); return (double) Item_func_month::val_int(); }
101
 
  String *val_str(String *str) 
102
 
  {
103
 
    str->set(val_int(), &my_charset_bin);
104
 
    return null_value ? 0 : str;
105
 
  }
106
 
  const char *func_name() const { return "month"; }
107
 
  enum Item_result result_type () const { return INT_RESULT; }
108
 
  void fix_length_and_dec() 
109
 
  { 
110
 
    collation.set(&my_charset_bin);
111
 
    decimals=0;
112
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
113
 
    maybe_null=1; 
114
 
  }
115
 
};
116
 
 
117
 
 
118
 
class Item_func_monthname :public Item_func_month
119
 
{
120
 
public:
121
 
  Item_func_monthname(Item *a) :Item_func_month(a) {}
122
 
  const char *func_name() const { return "monthname"; }
123
 
  String *val_str(String *str);
124
 
  enum Item_result result_type () const { return STRING_RESULT; }
125
 
  void fix_length_and_dec() 
126
 
  {
127
 
    collation.set(&my_charset_bin);
128
 
    decimals=0;
129
 
    max_length=10*my_charset_bin.mbmaxlen;
130
 
    maybe_null=1; 
131
 
  }
132
 
};
133
 
 
134
 
 
135
 
class Item_func_dayofyear :public Item_int_func
136
 
{
137
 
public:
138
 
  Item_func_dayofyear(Item *a) :Item_int_func(a) {}
139
 
  int64_t val_int();
140
 
  const char *func_name() const { return "dayofyear"; }
141
 
  void fix_length_and_dec() 
142
 
  { 
143
 
    decimals=0;
144
 
    max_length=3*MY_CHARSET_BIN_MB_MAXLEN;
145
 
    maybe_null=1; 
146
 
  }
147
 
};
148
 
 
149
 
 
150
 
class Item_func_hour :public Item_int_func
151
 
{
152
 
public:
153
 
  Item_func_hour(Item *a) :Item_int_func(a) {}
154
 
  int64_t val_int();
155
 
  const char *func_name() const { return "hour"; }
156
 
  void fix_length_and_dec()
157
 
  {
158
 
    decimals=0;
159
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
160
 
    maybe_null=1;
161
 
  }
162
 
};
163
 
 
164
 
 
165
 
class Item_func_minute :public Item_int_func
166
 
{
167
 
public:
168
 
  Item_func_minute(Item *a) :Item_int_func(a) {}
169
 
  int64_t val_int();
170
 
  const char *func_name() const { return "minute"; }
171
 
  void fix_length_and_dec()
172
 
  {
173
 
    decimals=0;
174
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
175
 
    maybe_null=1;
176
 
  }
177
 
};
178
 
 
179
 
 
180
 
class Item_func_quarter :public Item_int_func
181
 
{
182
 
public:
183
 
  Item_func_quarter(Item *a) :Item_int_func(a) {}
184
 
  int64_t val_int();
185
 
  const char *func_name() const { return "quarter"; }
186
 
  void fix_length_and_dec()
187
 
  { 
188
 
     decimals=0;
189
 
     max_length=1*MY_CHARSET_BIN_MB_MAXLEN;
190
 
     maybe_null=1;
191
 
  }
192
 
};
193
 
 
194
 
 
195
 
class Item_func_second :public Item_int_func
196
 
{
197
 
public:
198
 
  Item_func_second(Item *a) :Item_int_func(a) {}
199
 
  int64_t val_int();
200
 
  const char *func_name() const { return "second"; }
201
 
  void fix_length_and_dec() 
202
 
  { 
203
 
    decimals=0;
204
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
205
 
    maybe_null=1;
206
 
  }
207
 
};
208
 
 
209
 
 
210
 
class Item_func_week :public Item_int_func
211
 
{
212
 
public:
213
 
  Item_func_week(Item *a,Item *b) :Item_int_func(a,b) {}
214
 
  int64_t val_int();
215
 
  const char *func_name() const { return "week"; }
216
 
  void fix_length_and_dec()
217
 
  { 
218
 
    decimals=0;
219
 
    max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
220
 
    maybe_null=1;
221
 
  }
222
 
};
223
 
 
224
 
class Item_func_yearweek :public Item_int_func
225
 
{
226
 
public:
227
 
  Item_func_yearweek(Item *a,Item *b) :Item_int_func(a,b) {}
228
 
  int64_t val_int();
229
 
  const char *func_name() const { return "yearweek"; }
230
 
  void fix_length_and_dec()
231
 
  { 
232
 
    decimals=0;
233
 
    max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
234
 
    maybe_null=1;
235
 
  }
236
 
};
237
 
 
238
 
 
239
 
class Item_func_year :public Item_int_func
240
 
{
241
 
public:
242
 
  Item_func_year(Item *a) :Item_int_func(a) {}
243
 
  int64_t val_int();
244
 
  const char *func_name() const { return "year"; }
245
 
  enum_monotonicity_info get_monotonicity_info() const;
246
 
  int64_t val_int_endpoint(bool left_endp, bool *incl_endp);
247
 
  void fix_length_and_dec()
248
 
  { 
249
 
    decimals=0;
250
 
    max_length=4*MY_CHARSET_BIN_MB_MAXLEN;
251
 
    maybe_null=1;
252
 
  }
253
 
};
254
 
 
255
 
 
256
 
class Item_func_weekday :public Item_func
257
 
{
258
 
  bool odbc_type;
259
 
public:
260
 
  Item_func_weekday(Item *a,bool type_arg)
261
 
    :Item_func(a), odbc_type(type_arg) {}
262
 
  int64_t val_int();
263
 
  double val_real() { assert(fixed == 1); return (double) val_int(); }
264
 
  String *val_str(String *str)
265
 
  {
266
 
    assert(fixed == 1);
267
 
    str->set(val_int(), &my_charset_bin);
268
 
    return null_value ? 0 : str;
269
 
  }
270
 
  const char *func_name() const
271
 
  {
272
 
     return (odbc_type ? "dayofweek" : "weekday");
273
 
  }
274
 
  enum Item_result result_type () const { return INT_RESULT; }
275
 
  void fix_length_and_dec()
276
 
  {
277
 
    collation.set(&my_charset_bin);
278
 
    decimals=0;
279
 
    max_length=1*MY_CHARSET_BIN_MB_MAXLEN;
280
 
    maybe_null=1;
281
 
  }
282
 
};
283
 
 
284
 
class Item_func_dayname :public Item_func_weekday
285
 
{
286
 
 public:
287
 
  Item_func_dayname(Item *a) :Item_func_weekday(a,0) {}
288
 
  const char *func_name() const { return "dayname"; }
289
 
  String *val_str(String *str);
290
 
  enum Item_result result_type () const { return STRING_RESULT; }
291
 
  void fix_length_and_dec() 
292
 
  { 
293
 
    collation.set(&my_charset_bin);
294
 
    decimals=0; 
295
 
    max_length=9*MY_CHARSET_BIN_MB_MAXLEN;
296
 
    maybe_null=1; 
297
 
  }
298
 
};
299
 
 
300
 
 
301
 
class Item_func_unix_timestamp :public Item_int_func
302
 
{
303
 
  String value;
304
 
public:
305
 
  Item_func_unix_timestamp() :Item_int_func() {}
306
 
  Item_func_unix_timestamp(Item *a) :Item_int_func(a) {}
307
 
  int64_t val_int();
308
 
  const char *func_name() const { return "unix_timestamp"; }
309
 
  void fix_length_and_dec()
310
 
  {
311
 
    decimals=0;
312
 
    max_length=10*MY_CHARSET_BIN_MB_MAXLEN;
313
 
  }
314
 
};
315
 
 
316
 
 
317
 
class Item_func_time_to_sec :public Item_int_func
318
 
{
319
 
public:
320
 
  Item_func_time_to_sec(Item *item) :Item_int_func(item) {}
321
 
  int64_t val_int();
322
 
  const char *func_name() const { return "time_to_sec"; }
323
 
  void fix_length_and_dec()
324
 
  {
325
 
    decimals=0;
326
 
    max_length=10*MY_CHARSET_BIN_MB_MAXLEN;
327
 
  }
328
 
};
329
 
 
330
 
 
331
 
/*
332
 
  This can't be a Item_str_func, because the val_real() functions are special
333
 
*/
334
 
 
335
 
class Item_date :public Item_func
336
 
{
337
 
public:
338
 
  Item_date() :Item_func() {}
339
 
  Item_date(Item *a) :Item_func(a) {}
340
 
  enum Item_result result_type () const { return STRING_RESULT; }
341
 
  enum_field_types field_type() const { return DRIZZLE_TYPE_NEWDATE; }
342
 
  String *val_str(String *str);
343
 
  int64_t val_int();
344
 
  double val_real() { return val_real_from_decimal(); }
345
 
  const char *func_name() const { return "date"; }
346
 
  void fix_length_and_dec()
347
 
  { 
348
 
    collation.set(&my_charset_bin);
349
 
    decimals=0;
350
 
    max_length=MAX_DATE_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
351
 
  }
352
 
  Field *tmp_table_field(Table *table)
353
 
  {
354
 
    return tmp_table_field_from_field_type(table, 0);
355
 
  }
356
 
  bool result_as_int64_t() { return true; }
357
 
  my_decimal *val_decimal(my_decimal *decimal_value)
358
 
  {
359
 
    assert(fixed == 1);
360
 
    return  val_decimal_from_date(decimal_value);
361
 
  }
362
 
  int save_in_field(Field *field,
363
 
                    bool no_conversions __attribute__((unused)))
364
 
  {
365
 
    return save_date_in_field(field);
366
 
  }
367
 
};
368
 
 
369
 
 
370
 
class Item_date_func :public Item_str_func
371
 
{
372
 
public:
373
 
  Item_date_func() :Item_str_func() {}
374
 
  Item_date_func(Item *a) :Item_str_func(a) {}
375
 
  Item_date_func(Item *a,Item *b) :Item_str_func(a,b) {}
376
 
  Item_date_func(Item *a,Item *b, Item *c) :Item_str_func(a,b,c) {}
377
 
  enum_field_types field_type() const { return DRIZZLE_TYPE_DATETIME; }
378
 
  Field *tmp_table_field(Table *table)
379
 
  {
380
 
    return tmp_table_field_from_field_type(table, 0);
381
 
  }
382
 
  bool result_as_int64_t() { return true; }
383
 
  double val_real() { return (double) val_int(); }
384
 
  my_decimal *val_decimal(my_decimal *decimal_value)
385
 
  {
386
 
    assert(fixed == 1);
387
 
    return  val_decimal_from_date(decimal_value);
388
 
  }
389
 
  int save_in_field(Field *field,
390
 
                    bool no_conversions __attribute__((unused)))
391
 
  {
392
 
    return save_date_in_field(field);
393
 
  }
394
 
};
395
 
 
396
 
 
397
 
class Item_str_timefunc :public Item_str_func
398
 
{
399
 
public:
400
 
  Item_str_timefunc() :Item_str_func() {}
401
 
  Item_str_timefunc(Item *a) :Item_str_func(a) {}
402
 
  Item_str_timefunc(Item *a,Item *b) :Item_str_func(a,b) {}
403
 
  Item_str_timefunc(Item *a, Item *b, Item *c) :Item_str_func(a, b ,c) {}
404
 
  enum_field_types field_type() const { return DRIZZLE_TYPE_TIME; }
405
 
  void fix_length_and_dec()
406
 
  {
407
 
    decimals= DATETIME_DEC;
408
 
    max_length=MAX_TIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
409
 
  }
410
 
  Field *tmp_table_field(Table *table)
411
 
  {
412
 
    return tmp_table_field_from_field_type(table, 0);
413
 
  }
414
 
  double val_real() { return val_real_from_decimal(); }
415
 
  my_decimal *val_decimal(my_decimal *decimal_value)
416
 
  {
417
 
    assert(fixed == 1);
418
 
    return  val_decimal_from_time(decimal_value);
419
 
  }
420
 
  int save_in_field(Field *field,
421
 
                    bool no_conversions __attribute__((unused)))
422
 
  {
423
 
    return save_time_in_field(field);
424
 
  }
425
 
};
426
 
 
427
 
 
428
 
/* Abstract CURTIME function. Children should define what time zone is used */
429
 
 
430
 
class Item_func_curtime :public Item_str_timefunc
431
 
{
432
 
  int64_t value;
433
 
  char buff[9*2+32];
434
 
  uint32_t buff_length;
435
 
public:
436
 
  Item_func_curtime() :Item_str_timefunc() {}
437
 
  Item_func_curtime(Item *a) :Item_str_timefunc(a) {}
438
 
  double val_real() { assert(fixed == 1); return (double) value; }
439
 
  int64_t val_int() { assert(fixed == 1); return value; }
440
 
  String *val_str(String *str);
441
 
  void fix_length_and_dec();
442
 
  /* 
443
 
    Abstract method that defines which time zone is used for conversion.
444
 
    Converts time current time in my_time_t representation to broken-down
445
 
    DRIZZLE_TIME representation using UTC-SYSTEM or per-thread time zone.
446
 
  */
447
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
448
 
  bool result_as_int64_t() { return true; }
449
 
};
450
 
 
451
 
 
452
 
class Item_func_curtime_local :public Item_func_curtime
453
 
{
454
 
public:
455
 
  Item_func_curtime_local() :Item_func_curtime() {}
456
 
  Item_func_curtime_local(Item *a) :Item_func_curtime(a) {}
457
 
  const char *func_name() const { return "curtime"; }
458
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
459
 
};
460
 
 
461
 
 
462
 
class Item_func_curtime_utc :public Item_func_curtime
463
 
{
464
 
public:
465
 
  Item_func_curtime_utc() :Item_func_curtime() {}
466
 
  Item_func_curtime_utc(Item *a) :Item_func_curtime(a) {}
467
 
  const char *func_name() const { return "utc_time"; }
468
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
469
 
};
470
 
 
471
 
 
472
 
/* Abstract CURDATE function. See also Item_func_curtime. */
473
 
 
474
 
class Item_func_curdate :public Item_date
475
 
{
476
 
  int64_t value;
477
 
  DRIZZLE_TIME ltime;
478
 
public:
479
 
  Item_func_curdate() :Item_date() {}
480
 
  int64_t val_int() { assert(fixed == 1); return (value) ; }
481
 
  String *val_str(String *str);
482
 
  void fix_length_and_dec();
483
 
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
484
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
485
 
};
486
 
 
487
 
 
488
 
class Item_func_curdate_local :public Item_func_curdate
489
 
{
490
 
public:
491
 
  Item_func_curdate_local() :Item_func_curdate() {}
492
 
  const char *func_name() const { return "curdate"; }
493
 
  void store_now_in_TIME(DRIZZLE_TIME *now_time);
494
 
};
495
 
 
496
 
 
497
 
class Item_func_curdate_utc :public Item_func_curdate
498
 
{
499
 
public:
500
 
  Item_func_curdate_utc() :Item_func_curdate() {}
501
 
  const char *func_name() const { return "utc_date"; }
502
 
  void store_now_in_TIME(DRIZZLE_TIME *now_time);
503
 
};
504
 
 
505
 
 
506
 
/* Abstract CURRENT_TIMESTAMP function. See also Item_func_curtime */
507
 
 
508
 
class Item_func_now :public Item_date_func
509
 
{
510
 
protected:
511
 
  int64_t value;
512
 
  char buff[20*2+32];   // +32 to make my_snprintf_{8bit|ucs2} happy
513
 
  uint32_t buff_length;
514
 
  DRIZZLE_TIME ltime;
515
 
public:
516
 
  Item_func_now() :Item_date_func() {}
517
 
  Item_func_now(Item *a) :Item_date_func(a) {}
518
 
  enum Item_result result_type () const { return STRING_RESULT; }
519
 
  int64_t val_int() { assert(fixed == 1); return value; }
520
 
  int save_in_field(Field *to, bool no_conversions);
521
 
  String *val_str(String *str);
522
 
  void fix_length_and_dec();
523
 
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
524
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
525
 
};
526
 
 
527
 
 
528
 
class Item_func_now_local :public Item_func_now
529
 
{
530
 
public:
531
 
  Item_func_now_local() :Item_func_now() {}
532
 
  Item_func_now_local(Item *a) :Item_func_now(a) {}
533
 
  const char *func_name() const { return "now"; }
534
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
535
 
  virtual enum Functype functype() const { return NOW_FUNC; }
536
 
};
537
 
 
538
 
 
539
 
class Item_func_now_utc :public Item_func_now
540
 
{
541
 
public:
542
 
  Item_func_now_utc() :Item_func_now() {}
543
 
  Item_func_now_utc(Item *a) :Item_func_now(a) {}
544
 
  const char *func_name() const { return "utc_timestamp"; }
545
 
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
546
 
};
547
 
 
548
 
 
549
 
/*
550
 
  This is like NOW(), but always uses the real current time, not the
551
 
  query_start(). This matches the Oracle behavior.
552
 
*/
553
 
class Item_func_sysdate_local :public Item_func_now
554
 
{
555
 
public:
556
 
  Item_func_sysdate_local() :Item_func_now() {}
557
 
  Item_func_sysdate_local(Item *a) :Item_func_now(a) {}
558
 
  bool const_item() const { return 0; }
559
 
  const char *func_name() const { return "sysdate"; }
560
 
  void store_now_in_TIME(DRIZZLE_TIME *now_time);
561
 
  double val_real();
562
 
  int64_t val_int();
563
 
  int save_in_field(Field *to, bool no_conversions);
564
 
  String *val_str(String *str);
565
 
  void fix_length_and_dec();
566
 
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
567
 
  void update_used_tables()
568
 
  {
569
 
    Item_func_now::update_used_tables();
570
 
    used_tables_cache|= RAND_TABLE_BIT;
571
 
  }
572
 
};
573
 
 
574
 
 
575
 
class Item_func_from_days :public Item_date
576
 
{
577
 
public:
578
 
  Item_func_from_days(Item *a) :Item_date(a) {}
579
 
  const char *func_name() const { return "from_days"; }
580
 
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
581
 
};
582
 
 
583
 
 
584
59
class Item_func_date_format :public Item_str_func
585
60
{
586
61
  int fixed_length;
600
75
 
601
76
class Item_func_from_unixtime :public Item_date_func
602
77
{
603
 
  THD *thd;
 
78
  Session *session;
604
79
 public:
605
80
  Item_func_from_unixtime(Item *a) :Item_date_func(a) {}
606
81
  int64_t val_int();
1027
502
  const char *func_name() const { return "last_day"; }
1028
503
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
1029
504
};
 
505
 
 
506
#endif /* DRIZZLED_ITEM_TIMEFUNC_H */