1
#include <drizzled/item.h>
5
* Stores time interval for date/time manipulation
10
TemporalInterval(uint32_t in_year,
16
uint64_t in_second_part,
25
second_part(in_second_part),
42
* Sets whether or not this object specifies a negative interval
43
* @param[in] in_neg true if this is a negative interval, false if not
45
void setNegative(bool in_neg=true)
56
* Populate this TemporalInterval from a string value
58
* To make code easy, allow interval objects without separators.
60
* @param args argument Item structure
61
* @param int_type type of interval to create
62
* @param str_value String pointer to the input value
63
* @return true if the string would result in a null interval
66
bool value_from_item(Item *args, interval_type int_type, String *str_value);
69
* Adds this interval to a DRIZZLE_LTIME structure
71
* @param[in,out] ltime the interval will be added to ltime directly in the ltime structure
72
* @param[in] int_type the type of interval requested
73
* @retval true date was added and value stored properly
74
* @retval false result of addition is a null value
76
bool add_date(DRIZZLE_TIME *ltime, interval_type int_type);
82
* Get a array of positive numbers from a string object.
83
* Each number is separated by 1 non digit character
84
* Return error if there is too many numbers.
85
* If there is too few numbers, assume that the numbers are left out
86
* from the high end. This allows one to give:
87
* DAY_TO_SECOND as "D MM:HH:SS", "MM:HH:SS" "HH:SS" or as seconds.
89
* @param length: length of str
90
* @param cs: charset of str
91
* @param values: array of results
92
* @param count: count of elements in result array
93
* @param transform_msec: if value is true we suppose
94
* that the last part of string value is microseconds
95
* and we should transform value to six digit value.
96
* For example, '1.1' -> '1.100000'
98
bool get_interval_info(const char *str,uint32_t length, const CHARSET_INFO * const cs,
99
uint32_t count, uint64_t *values,
100
bool transform_msec);
108
uint64_t second_part;