21
21
#ifndef DRIZZLE_SERVER_FIELD_TIMESTAMP
22
22
#define DRIZZLE_SERVER_FIELD_TIMESTAMP
24
#include <drizzled/mysql_priv.h>
24
26
class Field_timestamp :public Field_str {
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);
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; }