~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-05 02:06:48 UTC
  • mfrom: (907.1.8 trunk-with-temporal)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: mordred@inaugust.com-20090305020648-7jk1gie4lqsi22g8
Merged from Jay.

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
 
25
27
/* Abstract CURRENT_TIMESTAMP function. See also Item_func_curtime */
26
28
 
27
29
class Item_func_now :public Item_date_func
31
33
  char buff[20*2+32];   // +32 to make my_snprintf_{8bit|ucs2} happy
32
34
  uint32_t buff_length;
33
35
  DRIZZLE_TIME ltime;
 
36
  drizzled::DateTime cached_temporal;
34
37
public:
35
38
  Item_func_now() :Item_date_func() {}
36
39
  Item_func_now(Item *a) :Item_date_func(a) {}
39
42
  int save_in_field(Field *to, bool no_conversions);
40
43
  String *val_str(String *str);
41
44
  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);
42
55
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
43
56
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
44
57
  bool check_vcol_func_processor(unsigned char *)