~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/epoch.h

Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
  enum_field_types type() const { return DRIZZLE_TYPE_TIMESTAMP;}
51
51
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
52
52
  enum Item_result cmp_type () const { return INT_RESULT; }
53
 
 
54
 
  int store(const char *to,uint32_t length,
55
 
            const CHARSET_INFO * const charset);
56
 
  int store(double nr);
57
 
  int store(int64_t nr, bool unsigned_val);
58
 
  int store_decimal(const type::Decimal *value);
59
 
 
 
53
  int  store(const char *to,uint32_t length,
 
54
             const CHARSET_INFO * const charset);
 
55
  int  store(double nr);
 
56
  int  store(int64_t nr, bool unsigned_val);
60
57
  int  reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0; return 0; }
61
 
  double val_real(void) const;
62
 
  int64_t val_int(void) const;
63
 
  String *val_str(String*,String *) const;
 
58
  double val_real(void);
 
59
  int64_t val_int(void);
 
60
  String *val_str(String*,String *);
64
61
  int cmp(const unsigned char *,const unsigned char *);
65
62
  void sort_string(unsigned char *buff,uint32_t length);
66
63
  uint32_t pack_length() const { return 8; }
71
68
  virtual void set_default();
72
69
 
73
70
  /* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
74
 
  virtual long get_timestamp(bool *null_value) const;
 
71
  virtual long get_timestamp(bool *null_value);
75
72
 
76
73
  virtual bool is_timestamp() const
77
74
  {
79
76
  }
80
77
 
81
78
private:
82
 
  bool get_date(type::Time &ltime,uint32_t fuzzydate) const;
83
 
  bool get_time(type::Time &ltime) const;
 
79
  bool get_date(type::Time *ltime,uint32_t fuzzydate);
 
80
  bool get_time(type::Time *ltime);
84
81
 
85
82
public:
86
83
  virtual timestamp_auto_set_type get_auto_set_type() const;