MySQL 9.1.0
Source Code Documentation
|
Cache for MYSQL_TIME value with various representations. More...
#include <item_timefunc.h>
Public Member Functions | |
MYSQL_TIME_cache () | |
void | set_date (MYSQL_TIME *ltime) |
Set time and time_packed from a DATE value. More... | |
void | set_time (MYSQL_TIME *ltime, uint8 dec_arg) |
Set time and time_packed from a TIME value. More... | |
void | set_datetime (MYSQL_TIME *ltime, uint8 dec_arg, const Time_zone *tz=nullptr) |
Set time and time_packed from a DATETIME value. More... | |
void | set_date (my_timeval tv, Time_zone *tz) |
Set time and time_packed according to DATE value in "struct timeval" representation and its time zone. More... | |
void | set_time (my_timeval tv, uint8 dec_arg, Time_zone *tz) |
Set time and time_packed according to TIME value in "struct timeval" representation and its time zone. More... | |
void | set_datetime (my_timeval tv, uint8 dec_arg, Time_zone *tz) |
Set time and time_packed according to DATETIME value in "struct timeval" representation and its time zone. More... | |
bool | eq (const MYSQL_TIME_cache &tm) const |
Test if cached value is equal to another MYSQL_TIME_cache value. More... | |
uint8 | decimals () const |
Return number of decimal digits. More... | |
longlong | val_packed () const |
Return packed representation. More... | |
bool | get_date (MYSQL_TIME *ltime, uint fuzzyflags) const |
Store MYSQL_TIME representation into the given date/datetime variable checking date flags. More... | |
bool | get_time (MYSQL_TIME *ltime) const |
Store MYSQL_TIME representation into the given time variable. More... | |
MYSQL_TIME * | get_TIME_ptr () |
Return pointer to MYSQL_TIME representation. More... | |
String * | val_str (String *str) |
Store string representation into String. More... | |
const char * | cptr () const |
Return C string representation. More... | |
Private Member Functions | |
void | get_TIME (MYSQL_TIME *ltime) const |
Store MYSQL_TIME representation into the given MYSQL_TIME variable. More... | |
Private Attributes | |
MYSQL_TIME | time |
MYSQL_TIME representation. More... | |
longlong | time_packed |
packed representation More... | |
char | string_buff [MAX_DATE_STRING_REP_LENGTH] |
string representation More... | |
uint | string_length |
length of string More... | |
uint8 | dec |
Number of decimals. More... | |
Cache for MYSQL_TIME value with various representations.
|
inline |
|
inline |
Return C string representation.
|
inline |
Return number of decimal digits.
|
inline |
Test if cached value is equal to another MYSQL_TIME_cache value.
bool MYSQL_TIME_cache::get_date | ( | MYSQL_TIME * | ltime, |
uint | fuzzyflags | ||
) | const |
Store MYSQL_TIME representation into the given date/datetime variable checking date flags.
|
inlineprivate |
Store MYSQL_TIME representation into the given MYSQL_TIME variable.
|
inline |
Store MYSQL_TIME representation into the given time variable.
|
inline |
Return pointer to MYSQL_TIME representation.
void MYSQL_TIME_cache::set_date | ( | my_timeval | tv, |
Time_zone * | tz | ||
) |
Set time and time_packed according to DATE value in "struct timeval" representation and its time zone.
void MYSQL_TIME_cache::set_date | ( | MYSQL_TIME * | ltime | ) |
Set time and time_packed from a DATE value.
void MYSQL_TIME_cache::set_datetime | ( | my_timeval | tv, |
uint8 | dec_arg, | ||
Time_zone * | tz | ||
) |
Set time and time_packed according to DATETIME value in "struct timeval" representation and its time zone.
void MYSQL_TIME_cache::set_datetime | ( | MYSQL_TIME * | ltime, |
uint8 | dec_arg, | ||
const Time_zone * | tz = nullptr |
||
) |
Set time and time_packed from a DATETIME value.
void MYSQL_TIME_cache::set_time | ( | my_timeval | tv, |
uint8 | dec_arg, | ||
Time_zone * | tz | ||
) |
Set time and time_packed according to TIME value in "struct timeval" representation and its time zone.
void MYSQL_TIME_cache::set_time | ( | MYSQL_TIME * | ltime, |
uint8 | dec_arg | ||
) |
Set time and time_packed from a TIME value.
|
inline |
Return packed representation.
|
private |
Number of decimals.
|
private |
string representation
|
private |
length of string
|
private |
MYSQL_TIME representation.
|
private |
packed representation