fb-cpp 0.0.1
A modern C++ wrapper for the Firebird database API
Loading...
Searching...
No Matches
fbcpp::Timestamp Struct Referencefinal

Combined date and time with microsecond precision. More...

#include <types.h>

Public Member Functions

bool operator== (const Timestamp &o) const noexcept
 
std::chrono::local_time< std::chrono::microseconds > toLocalTime () const noexcept
 Converts to std::chrono::local_time<std::chrono::microseconds>.
 

Static Public Member Functions

static Timestamp fromLocalTime (std::chrono::local_time< std::chrono::microseconds > value) noexcept
 Builds a timestamp from a local-time value.
 

Public Attributes

Date date {}
 Calendar date component.
 
Time time {std::chrono::microseconds::zero()}
 Time-of-day component.
 

Detailed Description

Combined date and time with microsecond precision.

Definition at line 118 of file types.h.

Member Function Documentation

◆ fromLocalTime()

static Timestamp fbcpp::Timestamp::fromLocalTime ( std::chrono::local_time< std::chrono::microseconds >  value)
inlinestaticnoexcept

Builds a timestamp from a local-time value.

Definition at line 138 of file types.h.

◆ operator==()

bool fbcpp::Timestamp::operator== ( const Timestamp o) const
inlinenoexcept

Definition at line 120 of file types.h.

◆ toLocalTime()

std::chrono::local_time< std::chrono::microseconds > fbcpp::Timestamp::toLocalTime ( ) const
inlinenoexcept

Converts to std::chrono::local_time<std::chrono::microseconds>.

Important: in Windows, std::chrono::local_time<std::chrono::microseconds> cannot represent all the valid date range supported by Firebird.

Definition at line 130 of file types.h.

Member Data Documentation

◆ date

Date fbcpp::Timestamp::date {}

Calendar date component.

Definition at line 150 of file types.h.

◆ time

Time fbcpp::Timestamp::time {std::chrono::microseconds::zero()}

Time-of-day component.

Definition at line 155 of file types.h.


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