userver: storages::mysql::Date Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
storages::mysql::Date Class Referencefinal

a class that represent MySQL DATE type. More...

#include </data/code/service_template/third_party/userver/mysql/include/userver/storages/mysql/dates.hpp>

Public Member Functions

 Date ()
 constructs a DATE with year/month/day being zero.
 
 Date (std::uint32_t year, std::uint32_t month, std::uint32_t day)
 constructs a DATE from provided year, month and day.
 
 Date (std::chrono::system_clock::time_point tp)
 constructs a DATE from provided timepoint.
 
std::chrono::system_clock::time_point ToTimePoint () const
 converts the DATE to timepoint in UTC time zone. throws if stored date is out of timepoint range.
 
std::uint32_t GetYear () const noexcept
 Returns the year part of the date.
 
std::uint32_t GetMonth () const noexcept
 Returns the month part of the date.
 
std::uint32_t GetDay () const noexcept
 Returns the day part of the date.
 
bool operator== (const Date &other) const noexcept
 

Detailed Description

a class that represent MySQL DATE type.

Definition at line 13 of file dates.hpp.


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