~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/date.h

New merge for TableShare

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <drizzled/field/str.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
class Field_date :public Field_str {
30
27
public:
31
28
 
58
55
  {}
59
56
  enum_field_types type() const { return DRIZZLE_TYPE_DATE;}
60
57
  enum_field_types real_type() const { return DRIZZLE_TYPE_DATE; }
61
 
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
 
58
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; }
62
59
  enum Item_result cmp_type () const { return INT_RESULT; }
63
60
  int  store(const char *to,uint32_t length,
64
61
             const CHARSET_INFO * const charset);
65
62
  int  store(double nr);
66
63
  int  store(int64_t nr, bool unsigned_val);
67
64
  int store_time(DRIZZLE_TIME *ltime, enum enum_drizzle_timestamp_type type);
68
 
  int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
 
65
  int reset(void) { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
69
66
  double val_real(void);
70
67
  int64_t val_int(void);
71
68
  String *val_str(String*,String *);
72
69
  int cmp(const unsigned char *,const unsigned char *);
73
70
  void sort_string(unsigned char *buff,uint32_t length);
74
 
  uint32_t pack_length() const { return 4; }
 
71
  uint32_t pack_length() const { return 3; }
75
72
  void sql_type(String &str) const;
76
73
  bool can_be_compared_as_int64_t() const { return true; }
77
74
  bool zero_pack() const { return 1; }
79
76
  bool get_time(DRIZZLE_TIME *ltime);
80
77
};
81
78
 
82
 
} /* namespace drizzled */
83
 
 
84
79
#endif /* DRIZZLED_FIELD_DATE_H */