466
by Monty Taylor
Fixed modelines... these files are c++. |
1 |
/* - mode: c++ c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
3 |
*
|
|
4 |
* Copyright (C) 2008 MySQL
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; either version 2 of the License, or
|
|
9 |
* (at your option) any later version.
|
|
10 |
*
|
|
11 |
* This program is distributed in the hope that it will be useful,
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
1122.2.10
by Monty Taylor
Fixed all of the include guards. |
21 |
#ifndef DRIZZLED_FIELD_TIMESTAMP_H
|
22 |
#define DRIZZLED_FIELD_TIMESTAMP_H
|
|
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
23 |
|
584.5.1
by Monty Taylor
Removed field includes from field.h. |
24 |
#include <drizzled/field/str.h> |
25 |
||
1000.1.3
by Brian Aker
Renamed TABLE_SHARE to TableShare |
26 |
class TableShare; |
584.5.1
by Monty Taylor
Removed field includes from field.h. |
27 |
typedef struct charset_info_st CHARSET_INFO; |
28 |
||
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
29 |
class Field_timestamp :public Field_str { |
30 |
public: |
|
779.3.18
by Monty Taylor
Cleaned up warnings up through innodb. |
31 |
|
32 |
using Field::val_int; |
|
33 |
using Field::val_str; |
|
34 |
using Field::cmp; |
|
35 |
using Field::store; |
|
1119.9.12
by Jay Pipes
First phase removal of MTYP_TYPENR() macro. This removes the unireg_check argument for all Field types where it is irrelevant (everything but numeric types and timestamp. |
36 |
Field_timestamp(unsigned char *ptr_arg, |
37 |
uint32_t len_arg, |
|
38 |
unsigned char *null_ptr_arg, |
|
39 |
unsigned char null_bit_arg, |
|
40 |
enum utype unireg_check_arg, |
|
41 |
const char *field_name_arg, |
|
42 |
TableShare *share, |
|
43 |
const CHARSET_INFO * const cs); |
|
44 |
Field_timestamp(bool maybe_null_arg, |
|
45 |
const char *field_name_arg, |
|
584.1.13
by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes. |
46 |
const CHARSET_INFO * const cs); |
212.2.2
by Patrick Galbraith
Renamed FIELD_TYPE to DRIZZLE_TYPE |
47 |
enum_field_types type() const { return DRIZZLE_TYPE_TIMESTAMP;} |
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
48 |
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } |
49 |
enum Item_result cmp_type () const { return INT_RESULT; } |
|
584.1.13
by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes. |
50 |
int store(const char *to,uint32_t length, |
51 |
const CHARSET_INFO * const charset); |
|
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
52 |
int store(double nr); |
53 |
int store(int64_t nr, bool unsigned_val); |
|
54 |
int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; } |
|
55 |
double val_real(void); |
|
56 |
int64_t val_int(void); |
|
57 |
String *val_str(String*,String *); |
|
481
by Brian Aker
Remove all of uchar. |
58 |
int cmp(const unsigned char *,const unsigned char *); |
482
by Brian Aker
Remove uint. |
59 |
void sort_string(unsigned char *buff,uint32_t length); |
205
by Brian Aker
uint32 -> uin32_t |
60 |
uint32_t pack_length() const { return 4; } |
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
61 |
void sql_type(String &str) const; |
62 |
bool can_be_compared_as_int64_t() const { return true; } |
|
63 |
bool zero_pack() const { return 0; } |
|
64 |
void set_time(); |
|
584.1.13
by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes. |
65 |
virtual void set_default(); |
66 |
||
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
67 |
/* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
|
584.1.13
by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes. |
68 |
long get_timestamp(bool *null_value); |
722.1.8
by Monty Taylor
Merged from Toru - removal of my_time_t. |
69 |
void store_timestamp(time_t timestamp); |
482
by Brian Aker
Remove uint. |
70 |
bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate); |
236.1.24
by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME. |
71 |
bool get_time(DRIZZLE_TIME *ltime); |
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
72 |
timestamp_auto_set_type get_auto_set_type() const; |
73 |
};
|
|
74 |
||
1122.2.10
by Monty Taylor
Fixed all of the include guards. |
75 |
#endif /* DRIZZLED_FIELD_TIMESTAMP_H */ |
173.1.6
by Toru Maesaka
ripped out TIMESTAMP and move to field/ |
76 |