ORM C++
Loading...
Searching...
No Matches
orm::query::QueryValue Class Referenceexport
module orm

A value that can be bound as a query parameter. More...

Public Types

using Value

Public Member Functions

 QueryValue (bool inputValue)
 QueryValue (char inputValue)
 QueryValue (signed char inputValue)
 QueryValue (unsigned char inputValue)
 QueryValue (short inputValue)
 QueryValue (unsigned short inputValue)
 QueryValue (int inputValue)
 QueryValue (unsigned int inputValue)
 QueryValue (long inputValue)
 QueryValue (unsigned long inputValue)
 QueryValue (long long inputValue)
 QueryValue (unsigned long long inputValue)
 QueryValue (float inputValue)
 QueryValue (double inputValue)
 QueryValue (const char *inputValue)
 QueryValue (std::string inputValue)
 QueryValue (std::string_view inputValue)
 QueryValue (Date inputValue)
 QueryValue (TimeOfDay inputValue)
 QueryValue (LocalDateTime inputValue)
 QueryValue (UtcTimestamp inputValue)
 QueryValue (Uuid inputValue)
template<UuidAdaptable T>
 QueryValue (const T &inputValue)
template<ValueConvertible T>
 QueryValue (const T &inputValue)
template<std::size_t Size>
 QueryValue (const char(&inputValue)[Size])
template<typename T>
 QueryValue (const std::optional< T > &optionalValue)
auto getLogicalType () const noexcept -> model::ColumnType
auto get () const -> const Value &
auto operator== (const QueryValue &other) const -> bool
auto operator<=> (const QueryValue &other) const -> std::partial_ordering

Static Public Member Functions

static auto fromStorage (model::ColumnType logicalType, Value value) -> QueryValue
 Restores a canonical transport value with its model-level type.
static auto isCompatibleStorage (model::ColumnType logicalType, const Value &storedValue) noexcept -> bool
 Checks both the canonical variant alternative and its logical range.

Detailed Description

A value that can be bound as a query parameter.

QueryValue stores the subset of C++ values supported by the SELECT query DSL. Values are rendered as SOCI bind parameters, not interpolated into SQL.

Definition at line 32 of file value.cppm.

Member Typedef Documentation

◆ Value

Initial value:
std::variant<int, long long, unsigned long long, double, std::string, Date, TimeOfDay,
std::chrono::year_month_day Date
Definition values.cppm:20
std::chrono::local_time< std::chrono::microseconds > LocalDateTime
Definition values.cppm:23
std::chrono::sys_time< std::chrono::microseconds > UtcTimestamp
Definition values.cppm:26

Definition at line 35 of file value.cppm.

Constructor & Destructor Documentation

◆ QueryValue() [1/26]

orm::query::QueryValue::QueryValue ( bool inputValue)
inline

Definition at line 38 of file value.cppm.

◆ QueryValue() [2/26]

orm::query::QueryValue::QueryValue ( char inputValue)
inline

Definition at line 39 of file value.cppm.

◆ QueryValue() [3/26]

orm::query::QueryValue::QueryValue ( signed char inputValue)
inline

Definition at line 40 of file value.cppm.

◆ QueryValue() [4/26]

orm::query::QueryValue::QueryValue ( unsigned char inputValue)
inline

Definition at line 43 of file value.cppm.

◆ QueryValue() [5/26]

orm::query::QueryValue::QueryValue ( short inputValue)
inline

Definition at line 47 of file value.cppm.

◆ QueryValue() [6/26]

orm::query::QueryValue::QueryValue ( unsigned short inputValue)
inline

Definition at line 48 of file value.cppm.

◆ QueryValue() [7/26]

orm::query::QueryValue::QueryValue ( int inputValue)
inline

Definition at line 52 of file value.cppm.

◆ QueryValue() [8/26]

orm::query::QueryValue::QueryValue ( unsigned int inputValue)
inline

Definition at line 53 of file value.cppm.

◆ QueryValue() [9/26]

orm::query::QueryValue::QueryValue ( long inputValue)
inline

Definition at line 57 of file value.cppm.

◆ QueryValue() [10/26]

orm::query::QueryValue::QueryValue ( unsigned long inputValue)
inline

Definition at line 62 of file value.cppm.

◆ QueryValue() [11/26]

orm::query::QueryValue::QueryValue ( long long inputValue)
inline

Definition at line 68 of file value.cppm.

◆ QueryValue() [12/26]

orm::query::QueryValue::QueryValue ( unsigned long long inputValue)
inline

Definition at line 69 of file value.cppm.

◆ QueryValue() [13/26]

orm::query::QueryValue::QueryValue ( float inputValue)
inline

Definition at line 72 of file value.cppm.

◆ QueryValue() [14/26]

orm::query::QueryValue::QueryValue ( double inputValue)
inline

Definition at line 73 of file value.cppm.

◆ QueryValue() [15/26]

orm::query::QueryValue::QueryValue ( const char * inputValue)
inline

Definition at line 74 of file value.cppm.

◆ QueryValue() [16/26]

orm::query::QueryValue::QueryValue ( std::string inputValue)
inline

Definition at line 75 of file value.cppm.

◆ QueryValue() [17/26]

orm::query::QueryValue::QueryValue ( std::string_view inputValue)
inline

Definition at line 76 of file value.cppm.

◆ QueryValue() [18/26]

orm::query::QueryValue::QueryValue ( Date inputValue)
inline

Definition at line 80 of file value.cppm.

◆ QueryValue() [19/26]

orm::query::QueryValue::QueryValue ( TimeOfDay inputValue)
inline

Definition at line 81 of file value.cppm.

◆ QueryValue() [20/26]

orm::query::QueryValue::QueryValue ( LocalDateTime inputValue)
inline

Definition at line 82 of file value.cppm.

◆ QueryValue() [21/26]

orm::query::QueryValue::QueryValue ( UtcTimestamp inputValue)
inline

Definition at line 83 of file value.cppm.

◆ QueryValue() [22/26]

orm::query::QueryValue::QueryValue ( Uuid inputValue)
inline

Definition at line 84 of file value.cppm.

◆ QueryValue() [23/26]

template<UuidAdaptable T>
orm::query::QueryValue::QueryValue ( const T & inputValue)
inline

Definition at line 87 of file value.cppm.

◆ QueryValue() [24/26]

template<ValueConvertible T>
orm::query::QueryValue::QueryValue ( const T & inputValue)
inline

Definition at line 94 of file value.cppm.

◆ QueryValue() [25/26]

template<std::size_t Size>
orm::query::QueryValue::QueryValue ( const char(&) inputValue[Size])
inline

Definition at line 99 of file value.cppm.

◆ QueryValue() [26/26]

template<typename T>
orm::query::QueryValue::QueryValue ( const std::optional< T > & optionalValue)
inline

Definition at line 105 of file value.cppm.

Member Function Documentation

◆ fromStorage()

auto orm::query::QueryValue::fromStorage ( model::ColumnType logicalType,
Value value ) -> QueryValue
inlinestaticnodiscard

Restores a canonical transport value with its model-level type.

Hydration and backend adapters use this factory when several logical column types share the same SOCI exchange representation.

Definition at line 115 of file value.cppm.

◆ get()

auto orm::query::QueryValue::get ( ) const -> const Value &
inlinenodiscard

Definition at line 188 of file value.cppm.

◆ getLogicalType()

auto orm::query::QueryValue::getLogicalType ( ) const -> model::ColumnType
inlinenodiscardnoexcept

Definition at line 183 of file value.cppm.

◆ isCompatibleStorage()

auto orm::query::QueryValue::isCompatibleStorage ( model::ColumnType logicalType,
const Value & storedValue ) -> bool
inlinestaticnodiscardnoexcept

Checks both the canonical variant alternative and its logical range.

Definition at line 128 of file value.cppm.

◆ operator<=>()

auto orm::query::QueryValue::operator<=> ( const QueryValue & other) const -> std::partial_ordering

◆ operator==()

auto orm::query::QueryValue::operator== ( const QueryValue & other) const -> bool

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