MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MYSQL_TIME_cache Class Reference

#include <item_timefunc.h>

Public Member Functions

void set_date (MYSQL_TIME *ltime)
void set_time (MYSQL_TIME *ltime, uint8 dec_arg)
void set_datetime (MYSQL_TIME *ltime, uint8 dec_arg)
void set_date (struct timeval tv, Time_zone *tz)
void set_time (struct timeval tv, uint8 dec_arg, Time_zone *tz)
void set_datetime (struct timeval tv, uint8 dec_arg, Time_zone *tz)
bool eq (const MYSQL_TIME_cache &tm) const
uint8 decimals () const
longlong val_packed () const
bool get_date (MYSQL_TIME *ltime, uint fuzzyflags) const
bool get_time (MYSQL_TIME *ltime) const
MYSQL_TIMEget_TIME_ptr ()
Stringval_str (String *str)
const char * cptr ()

Detailed Description

Cache for MYSQL_TIME value with various representations.

  • MYSQL_TIME representation (time) is initialized during set_XXX().
  • Packed representation (time_packed) is also initialized during set_XXX().
  • String representation (string_buff) is not initialized during set_XXX(); it's initialized only if val_str() or cptr() are called.

Definition at line 726 of file item_timefunc.h.

Member Function Documentation

const char * MYSQL_TIME_cache::cptr ( )

Return C string representation.

Definition at line 1762 of file item_timefunc.cc.

Here is the caller graph for this function:

uint8 MYSQL_TIME_cache::decimals ( ) const
inline

Return number of decimal digits.

Definition at line 808 of file item_timefunc.h.

bool MYSQL_TIME_cache::eq ( const MYSQL_TIME_cache tm) const
inline

Test if cached value is equal to another MYSQL_TIME_cache value.

Definition at line 800 of file item_timefunc.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Definition at line 1769 of file item_timefunc.cc.

bool MYSQL_TIME_cache::get_time ( MYSQL_TIME ltime) const
inline

Store MYSQL_TIME representation into the given time variable.

Definition at line 830 of file item_timefunc.h.

MYSQL_TIME* MYSQL_TIME_cache::get_TIME_ptr ( )
inline

Return pointer to MYSQL_TIME representation.

Definition at line 838 of file item_timefunc.h.

Here is the caller graph for this function:

void MYSQL_TIME_cache::set_date ( MYSQL_TIME ltime)

Set time and time_packed from a DATE value.

Definition at line 1701 of file item_timefunc.cc.

Here is the caller graph for this function:

void MYSQL_TIME_cache::set_date ( struct timeval  tv,
Time_zone tz 
)

Set time and time_packed according to DATE value in "struct timeval" representation and its time zone.

Definition at line 1731 of file item_timefunc.cc.

Here is the call graph for this function:

void MYSQL_TIME_cache::set_datetime ( MYSQL_TIME ltime,
uint8  dec_arg 
)

Set time and time_packed from a DATETIME value.

Definition at line 1711 of file item_timefunc.cc.

Here is the caller graph for this function:

void MYSQL_TIME_cache::set_datetime ( struct 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.

Definition at line 1721 of file item_timefunc.cc.

Here is the call graph for this function:

void MYSQL_TIME_cache::set_time ( MYSQL_TIME ltime,
uint8  dec_arg 
)

Set time and time_packed from a TIME value.

Definition at line 1691 of file item_timefunc.cc.

Here is the caller graph for this function:

void MYSQL_TIME_cache::set_time ( struct 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.

Definition at line 1743 of file item_timefunc.cc.

Here is the call graph for this function:

longlong MYSQL_TIME_cache::val_packed ( ) const
inline

Return packed representation.

Definition at line 817 of file item_timefunc.h.

Here is the caller graph for this function:

String * MYSQL_TIME_cache::val_str ( String str)

Store string representation into String.

Definition at line 1777 of file item_timefunc.cc.


The documentation for this class was generated from the following files: