SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches

◆ RetrieveValue()

template<NullableValueType T>
T sqt::NullableValueTraits< T >::RetrieveValue ( const Statement & statement,
int column_index )
static

Retrieves a nullable value from the statement at the specified column index.

Parameters
statementThe statement from which the value is retrieved.
column_indexThe index of the column from which to retrieve the value.
Returns
The retrieved value.

If the value at the specified column index is null, this method returns std::nullopt. Otherwise, it delegates to the RetrieveValue() method of the corresponding sqt::PrimitiveValueTraits<> specialization to retrieve the underlying value.

See also
sqt::PrimitiveValueTraits<INTEGER>::RetrieveValue()
sqt::PrimitiveValueTraits<FLOAT>::RetrieveValue()
sqt::PrimitiveValueTraits<std::string>::RetrieveValue()