1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
4
* Copyright (C) 2009 Sun Microsystems
25
25
#define DRIZZLED_TEMPORAL_INTERVAL_H
27
27
/* @TODO Replace this include with some forward decls */
28
#include <drizzled/item.h>
29
#include <drizzled/type/time.h>
28
#include "drizzled/item.h"
97
inline uint32_t get_year() { return year; }
98
inline void set_year(uint32_t new_year) { year = new_year; }
100
inline uint32_t get_month(){ return month; }
101
inline void set_month(uint32_t new_month) { month = new_month; }
103
inline uint32_t get_day(){ return day; }
104
inline void set_day(uint32_t new_day) { day = new_day; }
106
inline uint32_t get_hour(){ return hour; }
107
inline void set_hour(uint32_t new_hour) { hour = new_hour; }
109
inline uint64_t get_minute(){ return minute; }
110
inline void set_minute(uint32_t new_minute) { minute = new_minute; }
112
inline uint64_t get_second(){ return second; }
113
inline void set_second(uint32_t new_second) { second = new_second; }
115
inline uint64_t get_second_part(){ return second_part; }
116
inline void set_second_part(uint32_t new_second_part) { second_part = new_second_part; }
98
inline uint32_t get_year() { return year; };
99
inline void set_year(uint32_t new_year) { year = new_year; };
101
inline uint32_t get_month(){ return month; };
102
inline void set_month(uint32_t new_month) { month = new_month; };
104
inline uint32_t get_day(){ return day; };
105
inline void set_day(uint32_t new_day) { day = new_day; };
107
inline uint32_t get_hour(){ return hour; };
108
inline void set_hour(uint32_t new_hour) { hour = new_hour; };
110
inline uint64_t get_minute(){ return minute; };
111
inline void set_minute(uint32_t new_minute) { minute = new_minute; };
113
inline uint64_t get_second(){ return second; };
114
inline void set_second(uint32_t new_second) { second = new_second; };
116
inline uint64_t get_second_part(){ return second_part; };
117
inline void set_second_part(uint32_t new_second_part) { second_part = new_second_part; };
119
120
* Populate this TemporalInterval from a string value
136
137
* @retval true date was added and value stored properly
137
138
* @retval false result of addition is a null value
139
bool addDate(type::Time *ltime, interval_type int_type);
140
bool addDate(DRIZZLE_TIME *ltime, interval_type int_type);