~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.h

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_TIMESTAMP
22
22
#define DRIZZLE_SERVER_FIELD_TIMESTAMP
23
23
 
 
24
#include <drizzled/mysql_priv.h>
 
25
 
24
26
class Field_timestamp :public Field_str {
25
27
public:
26
28
  Field_timestamp(uchar *ptr_arg, uint32_t len_arg,
27
29
                  uchar *null_ptr_arg, uchar null_bit_arg,
28
30
                  enum utype unireg_check_arg, const char *field_name_arg,
29
 
                  TABLE_SHARE *share, const CHARSET_INFO * const cs);
 
31
                  TABLE_SHARE *share, CHARSET_INFO *cs);
30
32
  Field_timestamp(bool maybe_null_arg, const char *field_name_arg,
31
 
                  const CHARSET_INFO * const cs);
 
33
                  CHARSET_INFO *cs);
32
34
  enum_field_types type() const { return DRIZZLE_TYPE_TIMESTAMP;}
33
35
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
34
36
  enum Item_result cmp_type () const { return INT_RESULT; }
35
 
  int  store(const char *to,uint length, const CHARSET_INFO * const charset);
 
37
  int  store(const char *to,uint length,CHARSET_INFO *charset);
36
38
  int  store(double nr);
37
39
  int  store(int64_t nr, bool unsigned_val);
38
40
  int  reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
56
58
      Field::set_default();
57
59
  }
58
60
  /* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
59
 
  inline long get_timestamp(bool *null_value)
 
61
  inline long get_timestamp(my_bool *null_value)
60
62
  {
61
63
    if ((*null_value= is_null()))
62
64
      return 0;