27 #include <drizzled/item.h>
28 #include <drizzled/type/time.h>
46 uint64_t in_second_part,
54 second_part(in_second_part),
95 inline uint32_t get_year()
const {
return year; }
96 inline void set_year(uint32_t new_year) { year = new_year; }
98 inline uint32_t get_month()
const {
return month; }
99 inline void set_month(uint32_t new_month) { month = new_month; }
101 inline uint32_t get_day()
const {
return day; }
102 inline void set_day(uint32_t new_day) { day = new_day; }
104 inline uint32_t get_hour()
const {
return hour; }
105 inline void set_hour(uint32_t new_hour) { hour = new_hour; }
107 inline uint64_t get_minute()
const {
return minute; }
108 inline void set_minute(uint32_t new_minute) { minute = new_minute; }
110 inline uint64_t get_second()
const {
return second; }
111 inline void set_second(uint32_t new_second) { second = new_second; }
113 inline uint64_t get_second_part()
const {
return second_part; }
114 inline void set_second_part(uint32_t new_second_part) { second_part = new_second_part; }
127 bool initFromItem(Item *args, interval_type int_type, String *str_value);
137 bool addDate(type::Time *ltime, interval_type int_type);
150 static const uint32_t NUM_DAY_HOUR_STRING_ELEMENTS = 2;
151 static const uint32_t NUM_DAY_MICROSECOND_STRING_ELEMENTS = 5;
152 static const uint32_t NUM_DAY_MINUTE_STRING_ELEMENTS = 3;
153 static const uint32_t NUM_DAY_SECOND_STRING_ELEMENTS = 4;
154 static const uint32_t NUM_HOUR_MICROSECOND_STRING_ELEMENTS = 4;
155 static const uint32_t NUM_HOUR_MINUTE_STRING_ELEMENTS = 2;
156 static const uint32_t NUM_HOUR_SECOND_STRING_ELEMENTS = 3;
157 static const uint32_t NUM_MINUTE_MICROSECOND_STRING_ELEMENTS = 3;
158 static const uint32_t NUM_MINUTE_SECOND_STRING_ELEMENTS = 2;
159 static const uint32_t NUM_SECOND_MICROSECOND_STRING_ELEMENTS = 2;
184 bool transform_msec);
192 uint64_t second_part;
bool getIntervalFromString(const char *str, uint32_t length, const charset_info_st *const cs, uint32_t count, uint64_t *values, bool transform_msec)
bool initFromItem(Item *args, interval_type int_type, String *str_value)
Stores time interval for date/time manipulation.
TODO: Rename this file - func.h is stupid.
bool addDate(type::Time *ltime, interval_type int_type)
void setNegative(bool in_neg=true)
static const uint32_t NUM_YEAR_MONTH_STRING_ELEMENTS
static const uint32_t MAX_STRING_ELEMENTS