![]() |
MySQL 9.5.0
Source Code Documentation
|
Files | |
| file | my_temporal.h |
| Server classes for temporal handling (DATE, TIME, DATETIME) | |
| file | my_temporal.cc |
| Implementation of low level date, time and datetime utilities. | |
Functions | |
| bool | Time_val::is_adjusted (uint32_t decimals) const |
| uint32_t | Time_val::actual_decimals () const |
| void | Time_val::adjust_fraction (uint32_t decimals, bool round) |
| bool | Time_val::add (Time_val tv, bool subtract) |
| Add a time value to another time value, or subtract it. More... | |
| bool | Time_val::add (Interval &iv, bool subtract) |
| Add an interval to a time value, or subtract it. More... | |
| static Time_val | Time_val::strip_date (const MYSQL_TIME &mt) |
| Creates a Time_val from a date_time by extracting only the time fields. More... | |
| Time_val::operator MYSQL_TIME () const | |
| Convert time value to the generalized temporal time format. More... | |
| void | Time_val::store_time (uint8_t *ptr, uint32_t dec) const |
| Convert server time value to storage engine interface format. More... | |
| static void | Time_val::load_time (const uint8_t *ptr, uint32_t dec, Time_val *time) |
| Convert from storage engine interface time format to server time value. More... | |
| int64_t | Time_val::to_int_rounded () const |
| base100 representation without microsecond, but rounded '-12:34:56.999999' is returned as -123457 More... | |
| int64_t | Time_val::to_int_truncated () const |
| base100 representation without microsecond, '-12:34:56.999999' is returned as -123456 More... | |
| double | Time_val::to_double () const |
| base100 representation with microseconds, returned as double precision float More... | |
| size_t | Time_val::to_string (char *buffer, uint32_t dec) const |
| std::string | Time_val::to_string () const |
Variables | |
| static const uint32_t | divisors [] = {1000000, 100000, 10000, 1000, 100, 10} |
| uint32_t Time_val::actual_decimals | ( | ) | const |
| bool Time_val::add | ( | Interval & | iv, |
| bool | subtract | ||
| ) |
Add an interval to a time value, or subtract it.
| iv | Interval to add or subtract |
| subtract | If true, subtract the time value, otherwise add it. |
| bool Time_val::add | ( | Time_val | tv, |
| bool | subtract | ||
| ) |
Add a time value to another time value, or subtract it.
| tv | Time value to add or subtract |
| subtract | If true, subtract the time value, otherwise add it. |
| void Time_val::adjust_fraction | ( | uint32_t | decimals, |
| bool | round | ||
| ) |
| bool Time_val::is_adjusted | ( | uint32_t | decimals | ) | const |
|
static |
Convert from storage engine interface time format to server time value.
| ptr | The pointer to read the value at. | |
| dec | Precision. | |
| [out] | time | Returned time value |
|
explicit |
Convert time value to the generalized temporal time format.
| void Time_val::store_time | ( | uint8_t * | ptr, |
| uint32_t | dec | ||
| ) | const |
Convert server time value to storage engine interface format.
| [out] | ptr | The buffer to put value at. |
| dec | Precision. |
|
static |
Creates a Time_val from a date_time by extracting only the time fields.
| double Time_val::to_double | ( | ) | const |
base100 representation with microseconds, returned as double precision float
| int64_t Time_val::to_int_rounded | ( | ) | const |
base100 representation without microsecond, but rounded '-12:34:56.999999' is returned as -123457
| int64_t Time_val::to_int_truncated | ( | ) | const |
base100 representation without microsecond, '-12:34:56.999999' is returned as -123456
| std::string Time_val::to_string | ( | ) | const |
| size_t Time_val::to_string | ( | char * | buffer, |
| uint32_t | dec | ||
| ) | const |
|
static |