|
drizzle
C++ MySQL-protocol-compatible database server
|
Public Member Functions | |
| Time (uint32_t year_arg, uint32_t month_arg, uint32_t day_arg, uint32_t hour_arg, uint32_t minute_arg, uint32_t second_arg, usec_t second_part_arg, timestamp_t type_arg) | |
| Time (uint32_t hour_arg, uint32_t minute_arg, uint32_t second_arg, usec_t second_part_arg, bool neg_arg) | |
| void | reset () |
| timestamp_t | type () const |
| void | convert (drizzled::String &str, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME) |
| void | convert (char *str, size_t &to_length, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME) |
| void | convert (datetime_t &datetime, timestamp_t arg=type::DRIZZLE_TIMESTAMP_DATETIME) |
| void | convert (datetime_t &ret, int64_t nr, uint32_t flags) |
| void | convert (datetime_t &ret, int64_t nr, uint32_t flags, type::cut_t &was_cut) |
| void | convert (type::epoch_t &epoch, long *my_timezone) const |
| void | truncate (const timestamp_t arg) |
| bool | store (const char *str, uint32_t length, int &warning, type::timestamp_t arg=DRIZZLE_TIMESTAMP_TIME) |
| type::timestamp_t | store (const char *str, uint32_t length, uint32_t flags, type::cut_t &was_cut) |
| type::timestamp_t | store (const char *str, uint32_t length, uint32_t flags) |
| void | store (type::epoch_t from) |
| void | store (type::epoch_t from, usec_t from_fractional_seconds) |
| void | store (const tm &) |
| void | store (const timeval &) |
| bool | check (bool not_zero_date, uint32_t flags, type::cut_t &was_cut) const |
| Check datetime value for validity according to flags. | |
| bool | isValidEpoch () const |
Public Attributes | |
| uint32_t | year |
| uint32_t | month |
| uint32_t | day |
| uint32_t | hour |
| uint32_t | minute |
| uint32_t | second |
| usec_t | second_part |
| bool | neg |
| timestamp_t | time_type |
Static Public Attributes | |
| static const uint32_t | FRACTIONAL_DIGITS = 1000000 |
| static const size_t | MAX_STRING_LENGTH = 32 |
Definition at line 98 of file type/time.h.
|
inline |
Definition at line 101 of file type/time.h.
|
inline |
Definition at line 106 of file type/time.h.
|
inline |
Definition at line 126 of file type/time.h.
| bool drizzled::type::Time::check | ( | bool | not_zero_date, |
| uint32_t | flags, | ||
| type::cut_t & | was_cut ) const |
Check datetime value for validity according to flags.
| [in] | ltime | Date to check. |
| [in] | not_zero_date | ltime is not the zero date |
| [in] | flags | flags to check (see store() flags in drizzle_time.h) |
| [out] | was_cut | set to 2 if value was invalid according to flags. (Feb 29 in non-leap etc.) This remains unchanged if value is not invalid. |
Here we assume that year and month is ok! If month is 0 we allow any date. (This only happens if we allow zero date parts in store()) Disallow dates with zero year and non-zero month and/or day.
Definition at line 97 of file type/time.cc.
| void drizzled::type::Time::convert | ( | char * | str, |
| size_t & | to_length, | ||
| timestamp_t | arg = type::DRIZZLE_TIMESTAMP_DATETIME ) |
Definition at line 1071 of file type/time.cc.
| void drizzled::type::Time::convert | ( | datetime_t & | datetime, |
| timestamp_t | arg = type::DRIZZLE_TIMESTAMP_DATETIME ) |
Definition at line 1249 of file type/time.cc.
| void drizzled::type::Time::convert | ( | datetime_t & | ret, |
| int64_t | nr, | ||
| uint32_t | flags ) |
Definition at line 1231 of file type/time.cc.
| void drizzled::type::Time::convert | ( | datetime_t & | ret, |
| int64_t | nr, | ||
| uint32_t | flags, | ||
| type::cut_t & | was_cut ) |
Definition at line 1237 of file type/time.cc.
| void drizzled::type::Time::convert | ( | drizzled::String & | str, |
| timestamp_t | arg = type::DRIZZLE_TIMESTAMP_DATETIME ) |
Definition at line 1060 of file type/time.cc.
| void drizzled::type::Time::convert | ( | type::epoch_t & | epoch, |
| long * | my_timezone ) const |
Definition at line 841 of file type/time.cc.
|
inline |
Definition at line 183 of file type/time.h.
|
inline |
Definition at line 148 of file type/time.h.
| bool drizzled::type::Time::store | ( | const char * | str, |
| uint32_t | length, | ||
| int & | warning, | ||
| type::timestamp_t | arg = DRIZZLE_TIMESTAMP_TIME ) |
Definition at line 495 of file type/time.cc.
| type::timestamp_t drizzled::type::Time::store | ( | const char * | str, |
| uint32_t | length, | ||
| uint32_t | flags ) |
Definition at line 464 of file type/time.cc.
| type::timestamp_t drizzled::type::Time::store | ( | const char * | str, |
| uint32_t | length, | ||
| uint32_t | flags, | ||
| type::cut_t & | was_cut ) |
Definition at line 176 of file type/time.cc.
| void drizzled::type::Time::store | ( | type::epoch_t | from | ) |
Definition at line 1035 of file type/time.cc.
| void drizzled::type::Time::store | ( | type::epoch_t | from, |
| usec_t | from_fractional_seconds ) |
Definition at line 1040 of file type/time.cc.
| void drizzled::type::Time::truncate | ( | const timestamp_t | arg | ) |
Definition at line 1052 of file type/time.cc.
|
inline |
Definition at line 155 of file type/time.h.
| uint32_t drizzled::type::Time::day |
Definition at line 143 of file type/time.h.
|
static |
Definition at line 178 of file type/time.h.
| uint32_t drizzled::type::Time::hour |
Definition at line 143 of file type/time.h.
|
static |
Definition at line 179 of file type/time.h.
| uint32_t drizzled::type::Time::minute |
Definition at line 143 of file type/time.h.
| uint32_t drizzled::type::Time::month |
Definition at line 143 of file type/time.h.
| bool drizzled::type::Time::neg |
Definition at line 145 of file type/time.h.
| uint32_t drizzled::type::Time::second |
Definition at line 143 of file type/time.h.
| usec_t drizzled::type::Time::second_part |
Definition at line 144 of file type/time.h.
| timestamp_t drizzled::type::Time::time_type |
Definition at line 146 of file type/time.h.
| uint32_t drizzled::type::Time::year |
Definition at line 143 of file type/time.h.