~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-03-25 18:24:15 UTC
  • mto: This revision was merged to the branch mainline in revision 963.
  • Revision ID: brian@tangent.org-20090325182415-opf2720c1hidtfgk
Cut down on shutdown loop of plugins (cutting stuff out in order to simplify
old lock system).

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "drizzled/function/func.h"
24
24
#include "drizzled/function/str/strfunc.h"
25
 
#include <drizzled/temporal.h>
26
25
 
27
 
namespace drizzled
28
 
{
 
26
/* forward declarations */
 
27
namespace drizzled {class Date;}
29
28
 
30
29
/* A function which evaluates to a Date */
31
30
class Item_date :public Item_func
45
44
  {
46
45
    collation.set(&my_charset_bin);
47
46
    decimals=0;
48
 
    max_length=Date::MAX_STRING_LENGTH*MY_CHARSET_BIN_MB_MAXLEN;
 
47
    max_length=MAX_DATE_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
49
48
  }
50
49
  /**
51
50
   * All functions which inherit from Item_date must implement
52
51
   * their own get_temporal() method, which takes a supplied
53
 
   * Date reference and populates it with a correct
 
52
   * drizzled::Date reference and populates it with a correct
54
53
   * date based on the semantics of the function.
55
54
   *
56
55
   * Returns whether the function was able to correctly fill
57
56
   * the supplied date temporal with a proper date.
58
57
   *
59
 
   * @param Reference to a Date to populate
 
58
   * @param Reference to a drizzled::Date to populate
60
59
   */
61
 
  virtual bool get_temporal(Date &temporal)= 0;
 
60
  virtual bool get_temporal(drizzled::Date &temporal)= 0;
62
61
  Field *tmp_table_field(Table *table)
63
62
  {
64
63
    return tmp_table_field_from_field_type(table, 0);
104
103
  }
105
104
};
106
105
 
107
 
} /* namespace drizzled */
108
 
 
109
106
#endif /* DRIZZLED_FUNCTION_TIME_DATE_H */