|
Lightweight 0.20260303.0
|
#include <SqlTime.hpp>
Public Types | |
| using | native_type = std::chrono::hh_mm_ss< std::chrono::microseconds > |
| The native C++ type for time representation. | |
| using | sql_type = SQL_SS_TIME2_STRUCT |
| The SQL type used for ODBC binding. | |
Public Member Functions | |
| constexpr | SqlTime () noexcept=default |
| Default constructor. | |
| constexpr | SqlTime (SqlTime &&) noexcept=default |
| Move constructor. | |
| constexpr SqlTime & | operator= (SqlTime &&) noexcept=default |
| Move assignment operator. | |
| constexpr | SqlTime (SqlTime const &) noexcept=default |
| Copy constructor. | |
| constexpr SqlTime & | operator= (SqlTime const &) noexcept=default |
| Copy assignment operator. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr native_type | value () const noexcept |
| Returns the native time value. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator== (SqlTime const &other) const noexcept |
| Equality comparison operator. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator!= (SqlTime const &other) const noexcept |
| Inequality comparison operator. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlTime (native_type value) noexcept |
| Constructs a SqlTime from a native time value. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlTime (std::chrono::hours hour, std::chrono::minutes minute, std::chrono::seconds second, std::chrono::microseconds micros={}) noexcept |
| Constructs a SqlTime from hours, minutes, seconds, and optional microseconds. | |
Static Public Member Functions | |
| static LIGHTWEIGHT_FORCE_INLINE constexpr sql_type | ConvertToSqlValue (native_type value) noexcept |
| Converts a native time value to the SQL representation. | |
| static LIGHTWEIGHT_FORCE_INLINE constexpr native_type | ConvertToNative (sql_type const &value) noexcept |
| Converts a SQL time value to the native representation. | |
Public Attributes | |
| sql_type | sqlValue {} |
| The underlying SQL value for ODBC binding. | |
Stores the time (of the day) to efficiently write to or read from a database.
Definition at line 42 of file SqlTime.hpp.
| using Lightweight::SqlTime::native_type = std::chrono::hh_mm_ss<std::chrono::microseconds> |
The native C++ type for time representation.
Definition at line 45 of file SqlTime.hpp.
| using Lightweight::SqlTime::sql_type = SQL_SS_TIME2_STRUCT |
The SQL type used for ODBC binding.
Definition at line 49 of file SqlTime.hpp.
|
inlineconstexprnoexcept |
Constructs a SqlTime from a native time value.
Definition at line 89 of file SqlTime.hpp.
References ConvertToSqlValue(), and value().
|
inlineconstexprnoexcept |
Constructs a SqlTime from hours, minutes, seconds, and optional microseconds.
Definition at line 95 of file SqlTime.hpp.
|
inlineconstexprnoexcept |
Returns the native time value.
Definition at line 71 of file SqlTime.hpp.
References ConvertToNative(), and sqlValue.
Referenced by ConvertToNative(), ConvertToSqlValue(), operator==(), and SqlTime().
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Inequality comparison operator.
Definition at line 83 of file SqlTime.hpp.
|
inlinestaticconstexprnoexcept |
Converts a native time value to the SQL representation.
Definition at line 104 of file SqlTime.hpp.
References value().
Referenced by SqlTime().
|
inlinestaticconstexprnoexcept |
Converts a SQL time value to the native representation.
Definition at line 117 of file SqlTime.hpp.
References value().
Referenced by value().
| sql_type Lightweight::SqlTime::sqlValue {} |
The underlying SQL value for ODBC binding.
Definition at line 56 of file SqlTime.hpp.
Referenced by value().