Leosac  0.8.0
Open Source Access Control
odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp > Class Reference

This is inspired by the boost ODB profile. More...

#include <STDTimePointODB.hpp>

Public Types

using TimePoint = std::chrono::system_clock::time_point
 
typedef TimePoint value_type
 
typedef value_type query_type
 
typedef long long image_type
 

Static Public Member Functions

static void set_value (TimePoint &v, image_type i, bool is_null)
 
static void set_image (image_type &i, bool &is_null, const TimePoint &v)
 

Static Public Attributes

static const long long neg_inf = -0x7fffffffffffffffLL - 1
 
static const long long pos_inf = 0x7fffffffffffffffLL
 

Static Private Member Functions

static TimePoint pg_epoch ()
 Return a timepoint that represents the PGSQL TIMESTAMP epoch. More...
 

Detailed Description

This is inspired by the boost ODB profile.

This contains a few copy-paste from the ODB profile.

TIMESTAMP values are stored as micro-seconds since the PostgreSQL epoch 2000-01-01.

Definition at line 45 of file STDTimePointODB.hpp.

Member Typedef Documentation

◆ image_type

typedef long long odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::image_type

Definition at line 51 of file STDTimePointODB.hpp.

◆ query_type

typedef value_type odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::query_type

Definition at line 50 of file STDTimePointODB.hpp.

◆ TimePoint

using odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::TimePoint = std::chrono::system_clock::time_point

Definition at line 48 of file STDTimePointODB.hpp.

◆ value_type

typedef TimePoint odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::value_type

Definition at line 49 of file STDTimePointODB.hpp.

Member Function Documentation

◆ pg_epoch()

static TimePoint odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::pg_epoch ( )
inlinestaticprivate

Return a timepoint that represents the PGSQL TIMESTAMP epoch.

(2000/01/01 0:0)

Definition at line 102 of file STDTimePointODB.hpp.

◆ set_image()

static void odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::set_image ( image_type i,
bool &  is_null,
const TimePoint v 
)
inlinestatic

Definition at line 80 of file STDTimePointODB.hpp.

◆ set_value()

static void odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::set_value ( TimePoint v,
image_type  i,
bool  is_null 
)
inlinestatic

Definition at line 59 of file STDTimePointODB.hpp.

Member Data Documentation

◆ neg_inf

const long long odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::neg_inf = -0x7fffffffffffffffLL - 1
static

Definition at line 54 of file STDTimePointODB.hpp.

◆ pos_inf

const long long odb::pgsql::value_traits< std::chrono::system_clock::time_point, id_timestamp >::pos_inf = 0x7fffffffffffffffLL
static

Definition at line 57 of file STDTimePointODB.hpp.


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