~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                  const char *field_name_arg,
49
49
                  const CHARSET_INFO * const cs);
50
50
  enum_field_types type() const { return DRIZZLE_TYPE_TIMESTAMP;}
51
 
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
 
51
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
52
52
  enum Item_result cmp_type () const { return INT_RESULT; }
53
53
  int  store(const char *to,uint32_t length,
54
54
             const CHARSET_INFO * const charset);
55
55
  int  store(double nr);
56
56
  int  store(int64_t nr, bool unsigned_val);
57
 
  int  reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
 
57
  int  reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0; return 0; }
58
58
  double val_real(void);
59
59
  int64_t val_int(void);
60
60
  String *val_str(String*,String *);
61
61
  int cmp(const unsigned char *,const unsigned char *);
62
62
  void sort_string(unsigned char *buff,uint32_t length);
63
 
  uint32_t pack_length() const { return 4; }
 
63
  uint32_t pack_length() const { return 8; }
64
64
  void sql_type(String &str) const;
65
65
  bool can_be_compared_as_int64_t() const { return true; }
66
66
  bool zero_pack() const { return 0; }
69
69
 
70
70
  /* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
71
71
  long get_timestamp(bool *null_value);
72
 
  void store_timestamp(time_t timestamp);
 
72
private:
 
73
  void store_timestamp(int64_t timestamp);
73
74
  bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
74
75
  bool get_time(DRIZZLE_TIME *ltime);
 
76
public:
75
77
  timestamp_auto_set_type get_auto_set_type() const;
76
78
};
77
79