~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/now.h

  • Committer: Monty Taylor
  • Date: 2009-03-03 08:32:10 UTC
  • mfrom: (909 drizzle)
  • mto: This revision was merged to the branch mainline in revision 910.
  • Revision ID: mordred@inaugust.com-20090303083210-3cnjr53jspruighy
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <drizzled/function/time/date.h>
24
24
 
25
 
#include "drizzled/temporal.h"
26
 
 
27
25
/* Abstract CURRENT_TIMESTAMP function. See also Item_func_curtime */
28
26
 
29
27
class Item_func_now :public Item_date_func
33
31
  char buff[20*2+32];   // +32 to make my_snprintf_{8bit|ucs2} happy
34
32
  uint32_t buff_length;
35
33
  DRIZZLE_TIME ltime;
36
 
  drizzled::DateTime cached_temporal;
37
34
public:
38
35
  Item_func_now() :Item_date_func() {}
39
36
  Item_func_now(Item *a) :Item_date_func(a) {}
42
39
  int save_in_field(Field *to, bool no_conversions);
43
40
  String *val_str(String *str);
44
41
  void fix_length_and_dec();
45
 
  /**
46
 
   * For NOW() and sisters, there is no argument, and we 
47
 
   * return a cached Date value that we create during fix_length_and_dec.
48
 
   *
49
 
   * Always returns true, since a DateTime can always be constructed
50
 
   * from a time_t
51
 
   *
52
 
   * @param Reference to a drizzled::DateTime to populate
53
 
   */
54
 
  bool get_temporal(drizzled::DateTime &temporal);
55
42
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
56
43
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
57
44
  bool check_vcol_func_processor(unsigned char *)