~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-10-27 21:00:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1886.
  • Revision ID: brian@tangent.org-20101027210049-zfpgx2cfbrh8maq9
A couple of fixes to documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
33
33
{
34
34
protected:
35
35
  int64_t value;
36
 
  char buff[type::Time::MAX_STRING_LENGTH];
 
36
  char buff[20*2+32];   // +32 to make my_snprintf_{8bit|ucs2} happy
37
37
  uint32_t buff_length;
38
 
  type::Time ltime;
 
38
  DRIZZLE_TIME ltime;
39
39
  DateTime cached_temporal;
40
 
 
41
40
public:
42
41
  Item_func_now() :Item_date_func() {}
43
42
  Item_func_now(Item *a) :Item_date_func(a) {}
56
55
   * @param Reference to a DateTime to populate
57
56
   */
58
57
  bool get_temporal(DateTime &temporal);
59
 
  bool get_date(type::Time &res, uint32_t fuzzy_date);
60
 
  virtual void store_now_in_TIME(type::Time &now_time)=0;
 
58
  bool get_date(DRIZZLE_TIME *res, uint32_t fuzzy_date);
 
59
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
61
60
};
62
61
 
63
62
class Item_func_now_local :public Item_func_now
66
65
  Item_func_now_local() :Item_func_now() {}
67
66
  Item_func_now_local(Item *a) :Item_func_now(a) {}
68
67
  const char *func_name() const { return "now"; }
69
 
  virtual void store_now_in_TIME(type::Time &now_time);
 
68
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
70
69
  virtual enum Functype functype() const { return NOW_FUNC; }
71
70
};
72
71
 
77
76
  Item_func_now_utc() :Item_func_now() {}
78
77
  Item_func_now_utc(Item *a) :Item_func_now(a) {}
79
78
  const char *func_name() const { return "utc_timestamp"; }
80
 
  virtual void store_now_in_TIME(type::Time &now_time);
 
79
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time);
81
80
};
82
81
 
83
82
} /* namespace drizzled */