~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/datetime.h

Giant merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_DATETIME
22
22
#define DRIZZLE_SERVER_FIELD_DATETIME
23
23
 
24
 
#include "mysql_priv.h"
 
24
#include <drizzled/mysql_priv.h>
25
25
 
26
26
class Field_datetime :public Field_str {
27
27
public:
35
35
                 CHARSET_INFO *cs)
36
36
    :Field_str((uchar*) 0,19, maybe_null_arg ? (uchar*) "": 0,0,
37
37
               NONE, field_name_arg, cs) {}
38
 
  enum_field_types type() const { return MYSQL_TYPE_DATETIME;}
 
38
  enum_field_types type() const { return DRIZZLE_TYPE_DATETIME;}
39
39
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
40
40
  enum Item_result cmp_type () const { return INT_RESULT; }
41
41
  uint decimals() const { return DATETIME_DEC; }
42
42
  int  store(const char *to,uint length,CHARSET_INFO *charset);
43
43
  int  store(double nr);
44
44
  int  store(int64_t nr, bool unsigned_val);
45
 
  int store_time(MYSQL_TIME *ltime, timestamp_type type);
 
45
  int store_time(DRIZZLE_TIME *ltime, timestamp_type type);
46
46
  int reset(void)
47
47
  {
48
48
    ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0;
58
58
  void sql_type(String &str) const;
59
59
  bool can_be_compared_as_int64_t() const { return true; }
60
60
  bool zero_pack() const { return 1; }
61
 
  bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
62
 
  bool get_time(MYSQL_TIME *ltime);
 
61
  bool get_date(DRIZZLE_TIME *ltime,uint fuzzydate);
 
62
  bool get_time(DRIZZLE_TIME *ltime);
63
63
};
64
64
 
65
65
#endif