AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::sql::Timestamp Class Reference

SQL timestamp type. More...

#include <timestamp.hpp>

+ Inheritance diagram for anch::sql::Timestamp:
+ Collaboration diagram for anch::sql::Timestamp:

Public Member Functions

 Timestamp (bool init=true)
 
 Timestamp (const anch::date::Date &date)
 
 Timestamp (const std::time_t &time)
 
 Timestamp (const std::tm *const time)
 
virtual ~Timestamp ()
 
- Public Member Functions inherited from anch::date::Date
 Date (bool init=true)
 
 Date (const std::time_t &time)
 
 Date (const std::tm *const time)
 
 Date (const std::timespec &time)
 
virtual ~Date ()
 
bool after (const Date &date) const noexcept
 
bool before (const Date &date) const noexcept
 
bool equals (const Date &date) const noexcept
 
bool operator> (const Date &date) const noexcept
 
bool operator>= (const Date &date) const noexcept
 
bool operator< (const Date &date) const noexcept
 
bool operator<= (const Date &date) const noexcept
 
bool operator== (const Date &date) const noexcept
 
bool operator!= (const Date &date) const noexcept
 
 operator std::time_t () const noexcept
 
 operator std::tm () const noexcept
 
 operator std::timespec () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from anch::date::Date
std::int64_t _timestamp
 
int32_t _years = 0
 
uint16_t _months = 0
 
uint16_t _ydays = 0
 
uint16_t _mdays = 0
 
uint16_t _wdays = 0
 
uint16_t _hours = 0
 
uint16_t _minutes = 0
 
uint16_t _seconds = 0
 
uint16_t _milliseconds = 0
 
uint16_t _microseconds = 0
 
uint16_t _nanoseconds = 0
 
- Static Protected Attributes inherited from anch::date::Date
static std::mutex _mutex
 

Detailed Description

SQL timestamp type.

SQL timestamp type.
It will take into account from year to microseconds.

Since
0.1
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ Timestamp() [1/4]

anch::sql::Timestamp::Timestamp ( bool init = true)

Timestamp default constructor.

Parameters
initInitialize the Timestamp to now (default true)

◆ Timestamp() [2/4]

anch::sql::Timestamp::Timestamp ( const anch::date::Date & date)

Timestamp private copy constructor

Parameters
dateThe Date to copy

◆ Timestamp() [3/4]

anch::sql::Timestamp::Timestamp ( const std::time_t & time)

Timestamp constructor.

Parameters
timeThe time to set

◆ Timestamp() [4/4]

anch::sql::Timestamp::Timestamp ( const std::tm *const time)

Timestamp constructor.

Parameters
timeThe time to set

◆ ~Timestamp()

virtual anch::sql::Timestamp::~Timestamp ( )
virtual

Timestamp destructor


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