Lightweight 0.20250904.0
Loading...
Searching...
No Matches
Lightweight::SqlTime Struct Reference

#include <SqlTime.hpp>

Public Types

using native_type = std::chrono::hh_mm_ss< std::chrono::microseconds >
 
using sql_type = SQL_SS_TIME2_STRUCT
 

Public Member Functions

constexpr SqlTime (SqlTime &&) noexcept=default
 
constexpr SqlTimeoperator= (SqlTime &&) noexcept=default
 
constexpr SqlTime (SqlTime const &) noexcept=default
 
constexpr SqlTimeoperator= (SqlTime const &) noexcept=default
 
LIGHTWEIGHT_FORCE_INLINE constexpr native_type value () const noexcept
 
LIGHTWEIGHT_FORCE_INLINE constexpr bool operator== (SqlTime const &other) const noexcept
 
LIGHTWEIGHT_FORCE_INLINE constexpr bool operator!= (SqlTime const &other) const noexcept
 
LIGHTWEIGHT_FORCE_INLINE constexpr SqlTime (native_type value) noexcept
 
LIGHTWEIGHT_FORCE_INLINE constexpr SqlTime (std::chrono::hours hour, std::chrono::minutes minute, std::chrono::seconds second, std::chrono::microseconds micros={}) noexcept
 

Static Public Member Functions

static LIGHTWEIGHT_FORCE_INLINE constexpr sql_type ConvertToSqlValue (native_type value) noexcept
 
static LIGHTWEIGHT_FORCE_INLINE constexpr native_type ConvertToNative (sql_type const &value) noexcept
 

Public Attributes

sql_type sqlValue {}
 

Detailed Description

Stores the time (of the day) to efficiently write to or read from a database.

Definition at line 42 of file SqlTime.hpp.

Member Typedef Documentation

◆ native_type

using Lightweight::SqlTime::native_type = std::chrono::hh_mm_ss<std::chrono::microseconds>

Definition at line 44 of file SqlTime.hpp.

◆ sql_type

using Lightweight::SqlTime::sql_type = SQL_SS_TIME2_STRUCT

Definition at line 47 of file SqlTime.hpp.

Constructor & Destructor Documentation

◆ SqlTime() [1/2]

LIGHTWEIGHT_FORCE_INLINE constexpr Lightweight::SqlTime::SqlTime ( native_type  value)
inlineconstexprnoexcept

Definition at line 76 of file SqlTime.hpp.

◆ SqlTime() [2/2]

LIGHTWEIGHT_FORCE_INLINE constexpr Lightweight::SqlTime::SqlTime ( std::chrono::hours  hour,
std::chrono::minutes  minute,
std::chrono::seconds  second,
std::chrono::microseconds  micros = {} 
)
inlineconstexprnoexcept

Definition at line 81 of file SqlTime.hpp.

Member Function Documentation

◆ value()

LIGHTWEIGHT_FORCE_INLINE constexpr native_type Lightweight::SqlTime::value ( ) const
inlineconstexprnoexcept

Definition at line 61 of file SqlTime.hpp.

◆ operator==()

LIGHTWEIGHT_FORCE_INLINE constexpr bool Lightweight::SqlTime::operator== ( SqlTime const &  other) const
inlineconstexprnoexcept

Definition at line 66 of file SqlTime.hpp.

◆ operator!=()

LIGHTWEIGHT_FORCE_INLINE constexpr bool Lightweight::SqlTime::operator!= ( SqlTime const &  other) const
inlineconstexprnoexcept

Definition at line 71 of file SqlTime.hpp.

◆ ConvertToSqlValue()

static LIGHTWEIGHT_FORCE_INLINE constexpr sql_type Lightweight::SqlTime::ConvertToSqlValue ( native_type  value)
inlinestaticconstexprnoexcept

Definition at line 89 of file SqlTime.hpp.

◆ ConvertToNative()

static LIGHTWEIGHT_FORCE_INLINE constexpr native_type Lightweight::SqlTime::ConvertToNative ( sql_type const &  value)
inlinestaticconstexprnoexcept

Definition at line 101 of file SqlTime.hpp.

Member Data Documentation

◆ sqlValue

sql_type Lightweight::SqlTime::sqlValue {}

Definition at line 52 of file SqlTime.hpp.


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