MySQL 8.0.39
Source Code Documentation
classic_protocol::borrowable::binary::DatetimeBase Class Reference

POD base-type for Datetime, Timestamp, Date. More...

#include <classic_protocol_binary.h>

Inheritance diagram for classic_protocol::borrowable::binary::DatetimeBase:
[legend]

Public Member Functions

 DatetimeBase ()=default
 
constexpr DatetimeBase (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t microsecond=0)
 
constexpr DatetimeBase (uint16_t year, uint8_t month, uint8_t day)
 
constexpr uint16_t year () const
 
constexpr uint8_t month () const
 
constexpr uint8_t day () const
 
constexpr uint8_t hour () const
 
constexpr uint8_t minute () const
 
constexpr uint8_t second () const
 
constexpr uint32_t microsecond () const
 

Private Attributes

uint16_t year_ {}
 
uint8_t month_ {}
 
uint8_t day_ {}
 
uint8_t hour_ {}
 
uint8_t minute_ {}
 
uint8_t second_ {}
 
uint32_t microsecond_ {}
 

Friends

bool operator== (const DatetimeBase &lhs, const DatetimeBase &rhs)
 
bool operator!= (const DatetimeBase &lhs, const DatetimeBase &rhs)
 

Detailed Description

POD base-type for Datetime, Timestamp, Date.

Constructor & Destructor Documentation

◆ DatetimeBase() [1/3]

classic_protocol::borrowable::binary::DatetimeBase::DatetimeBase ( )
default

◆ DatetimeBase() [2/3]

constexpr classic_protocol::borrowable::binary::DatetimeBase::DatetimeBase ( uint16_t  year,
uint8_t  month,
uint8_t  day,
uint8_t  hour,
uint8_t  minute,
uint8_t  second,
uint32_t  microsecond = 0 
)
inlineconstexpr

◆ DatetimeBase() [3/3]

constexpr classic_protocol::borrowable::binary::DatetimeBase::DatetimeBase ( uint16_t  year,
uint8_t  month,
uint8_t  day 
)
inlineconstexpr

Member Function Documentation

◆ day()

constexpr uint8_t classic_protocol::borrowable::binary::DatetimeBase::day ( ) const
inlineconstexpr

◆ hour()

constexpr uint8_t classic_protocol::borrowable::binary::DatetimeBase::hour ( ) const
inlineconstexpr

◆ microsecond()

constexpr uint32_t classic_protocol::borrowable::binary::DatetimeBase::microsecond ( ) const
inlineconstexpr

◆ minute()

constexpr uint8_t classic_protocol::borrowable::binary::DatetimeBase::minute ( ) const
inlineconstexpr

◆ month()

constexpr uint8_t classic_protocol::borrowable::binary::DatetimeBase::month ( ) const
inlineconstexpr

◆ second()

constexpr uint8_t classic_protocol::borrowable::binary::DatetimeBase::second ( ) const
inlineconstexpr

◆ year()

constexpr uint16_t classic_protocol::borrowable::binary::DatetimeBase::year ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const DatetimeBase lhs,
const DatetimeBase rhs 
)
friend

◆ operator==

bool operator== ( const DatetimeBase lhs,
const DatetimeBase rhs 
)
friend

Member Data Documentation

◆ day_

uint8_t classic_protocol::borrowable::binary::DatetimeBase::day_ {}
private

◆ hour_

uint8_t classic_protocol::borrowable::binary::DatetimeBase::hour_ {}
private

◆ microsecond_

uint32_t classic_protocol::borrowable::binary::DatetimeBase::microsecond_ {}
private

◆ minute_

uint8_t classic_protocol::borrowable::binary::DatetimeBase::minute_ {}
private

◆ month_

uint8_t classic_protocol::borrowable::binary::DatetimeBase::month_ {}
private

◆ second_

uint8_t classic_protocol::borrowable::binary::DatetimeBase::second_ {}
private

◆ year_

uint16_t classic_protocol::borrowable::binary::DatetimeBase::year_ {}
private

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