ORM C++
Loading...
Searching...
No Matches
orm::db::binding Namespace Referenceexport

Classes

class  Binary16Buffer
struct  BindingInfo
 Binding info. More...
struct  BindingPayload
struct  CollectionPayload
class  ConversionError
 Internal signal for a result value that cannot be represented by the requested model or projection field without loss. More...
struct  IsOptional
struct  IsOptional< std::optional< T > >
struct  ObjectFieldFromProjectionValues
struct  ObjectFieldFromProjectionValues< ResultField >
struct  ObjectFieldFromProjectionValuesWithCast
struct  ObjectFieldFromValues
struct  ObjectFieldToValues
struct  OptionalValue
struct  OptionalValue< T >
struct  PrimaryKeyLess
struct  ProjectionPayload
struct  ResultColumn
class  StatementBindings
class  TypedResultStorage

Concepts

concept  IsOneOfTypes
concept  SociConvertableToInt
concept  SociConvertableToLongLong
concept  SociConvertableToUnsignedLongLong
concept  SociConvertableToDouble
concept  SociDefaultSupported
concept  SchemaModel
concept  SociEncodedValue

Typedefs

template<typename T>
using optional_value_t = typename OptionalValue<std::remove_cv_t<T>>::Type
using PrimaryKey = std::vector<query::QueryValue>

Functions

template<typename Wrapper, typename Value>
auto makeNullableValue (Value value) -> Wrapper
template<UuidAdaptable T>
auto canonicalUuid (const T &value) -> Uuid
template<SociEncodedValue T>
auto encodeScalarValue (const T &value) -> std::string
template<SociEncodedValue T>
auto decodeScalarValue (std::string_view text) -> T
template<SociEncodedValue T>
auto getEncodedScalarValue (const auto &values, const std::string &name) -> T
template<typename Result, typename Source>
constexpr auto isIntegralInRange (Source value) noexcept -> bool
auto throwLossyNumericConversion (std::string_view fieldName) -> void
template<typename Result, typename Source>
auto checkedNumericCast (Source value, std::string_view fieldName) -> Result
template<typename Result>
auto parseNumericValue (std::string_view value, std::string_view fieldName) -> Result
template<typename Result, typename Stored>
auto tryGetNumericValue (Result *result, const auto &values, const std::string &fieldName) -> bool
template<typename Result>
auto getNumericValue (const auto &values, const std::string &fieldName) -> Result
template<typename ModelField>
auto getScalarFieldValue (const auto &values, const std::string &fieldName) -> ModelField
template<typename T>
auto bindTypedNull (soci::values &values, std::string_view name, const T &value) -> void
auto setNullValue (soci::values &values, const std::string &name, model::ColumnType type) -> void
auto validateStringLength (std::string_view text, std::optional< std::size_t > limit) -> void
template<typename ModelField>
auto setScalarFieldValue (soci::values &values, const std::string &fieldName, const ModelField &field, model::ColumnType columnType, std::optional< std::size_t > maxStringLength=std::nullopt) -> void
auto toQueryValue (const query::QueryValue &value) -> query::QueryValue
template<typename T>
auto toPrimaryKeyValue (const T &value, const std::string &fieldName) -> query::QueryValue
template<typename SchemaType, typename T>
auto getPrimaryKey (const T &object) -> PrimaryKey
auto getPrimaryKeyValue (const auto &values, const std::string &name, model::ColumnType type) -> query::QueryValue
auto getPrimaryKeyColumns (const model::ModelView &model) -> std::vector< const model::ColumnView * >
auto relationOwnerAlias (const model::ColumnView &column) -> std::string
template<typename ResultField>
auto parseNumericProjectionValue (const std::string &value, const std::string &fieldName) -> ResultField
template<typename ResultField, typename StoredField>
auto tryGetNumericProjectionValue (ResultField *field, const std::string &fieldName, const auto &values) -> bool
template<typename ResultField>
auto getNumericProjectionValue (ResultField *field, const std::string &fieldName, const auto &values) -> void
template<typename ResultField>
auto readProjectedValue (const auto &values, const std::string &fieldName) -> ResultField
auto bindNull (soci::values &values, std::string_view name, model::ColumnType logicalType) -> void
auto hasCompatibleStorage (const BoundValue &value) -> bool
auto bindBoundValue (soci::values &values, std::string_view name, const BoundValue &value) -> void
auto bindStatementParameter (soci::values &values, const StatementParameter &parameter) -> void
auto isEncodedResultType (model::ColumnType type) noexcept -> bool
auto hasEncodedResult (const std::vector< ResultColumn > &columns) -> bool
auto validateResultIndicator (soci::indicator indicator) -> void
auto modelResultColumns (model::ModelView model, bool joined) -> std::vector< ResultColumn >
auto resultSource (const query::detail::Column &column) -> db::detail::SqlSource
auto resultSource (const query::detail::AggregateExpression &expression) -> db::detail::SqlSource
auto resultSourceType (const db::detail::SqlSource &source, model::ModelView model) -> model::ColumnType
template<typename Result, typename Projections>
auto projectionResultColumns (model::ModelView model, const Projections &projections) -> std::vector< ResultColumn >
auto isWithinValueLimits (const BoundValue &bound, const BackendValueLimits &limits, const BackendRuntimeLimits &runtime={}) noexcept -> bool

Variables

template<typename T>
constexpr bool isOptional = IsOptional<std::remove_cv_t<T>>::value

Typedef Documentation

◆ optional_value_t

template<typename T>
using orm::db::binding::optional_value_t = typename OptionalValue<std::remove_cv_t<T>>::Type
export

Definition at line 61 of file numeric.cppm.

◆ PrimaryKey

Definition at line 362 of file contracts.cppm.

Function Documentation

◆ bindBoundValue()

auto orm::db::binding::bindBoundValue ( soci::values & values,
std::string_view name,
const BoundValue & value ) -> void
inline

Definition at line 279 of file result_binding.cppm.

◆ bindNull()

auto orm::db::binding::bindNull ( soci::values & values,
std::string_view name,
model::ColumnType logicalType ) -> void
inline

Definition at line 231 of file result_binding.cppm.

◆ bindStatementParameter()

auto orm::db::binding::bindStatementParameter ( soci::values & values,
const StatementParameter & parameter ) -> void
inline

Definition at line 297 of file result_binding.cppm.

◆ bindTypedNull()

template<typename T>
auto orm::db::binding::bindTypedNull ( soci::values & values,
std::string_view name,
const T & value ) -> void
inline

Definition at line 222 of file object_binding.cppm.

◆ canonicalUuid()

template<UuidAdaptable T>
auto orm::db::binding::canonicalUuid ( const T & value) -> Uuid

Definition at line 93 of file numeric.cppm.

◆ checkedNumericCast()

template<typename Result, typename Source>
auto orm::db::binding::checkedNumericCast ( Source value,
std::string_view fieldName ) -> Result

Definition at line 229 of file numeric.cppm.

◆ decodeScalarValue()

template<SociEncodedValue T>
auto orm::db::binding::decodeScalarValue ( std::string_view text) -> T

Definition at line 127 of file numeric.cppm.

◆ encodeScalarValue()

template<SociEncodedValue T>
auto orm::db::binding::encodeScalarValue ( const T & value) -> std::string

Definition at line 106 of file numeric.cppm.

◆ getEncodedScalarValue()

template<SociEncodedValue T>
auto orm::db::binding::getEncodedScalarValue ( const auto & values,
const std::string & name ) -> T

Definition at line 151 of file numeric.cppm.

◆ getNumericProjectionValue()

template<typename ResultField>
auto orm::db::binding::getNumericProjectionValue ( ResultField * field,
const std::string & fieldName,
const auto & values ) -> void

Definition at line 90 of file result_binding.cppm.

◆ getNumericValue()

template<typename Result>
auto orm::db::binding::getNumericValue ( const auto & values,
const std::string & fieldName ) -> Result

Definition at line 421 of file numeric.cppm.

◆ getPrimaryKey()

template<typename SchemaType, typename T>
auto orm::db::binding::getPrimaryKey ( const T & object) -> PrimaryKey

Definition at line 163 of file payload.cppm.

◆ getPrimaryKeyColumns()

auto orm::db::binding::getPrimaryKeyColumns ( const model::ModelView & model) -> std::vector< const model::ColumnView * >
inline

Definition at line 256 of file payload.cppm.

◆ getPrimaryKeyValue()

auto orm::db::binding::getPrimaryKeyValue ( const auto & values,
const std::string & name,
model::ColumnType type ) -> query::QueryValue
inline

Definition at line 203 of file payload.cppm.

◆ getScalarFieldValue()

template<typename ModelField>
auto orm::db::binding::getScalarFieldValue ( const auto & values,
const std::string & fieldName ) -> ModelField
export

Definition at line 24 of file object_binding.cppm.

◆ hasCompatibleStorage()

auto orm::db::binding::hasCompatibleStorage ( const BoundValue & value) -> bool
inline

Definition at line 269 of file result_binding.cppm.

◆ hasEncodedResult()

auto orm::db::binding::hasEncodedResult ( const std::vector< ResultColumn > & columns) -> bool
inline

Definition at line 177 of file result_storage.cppm.

◆ isEncodedResultType()

auto orm::db::binding::isEncodedResultType ( model::ColumnType type) -> bool
inlinenoexcept

Definition at line 171 of file result_storage.cppm.

◆ isIntegralInRange()

template<typename Result, typename Source>
auto orm::db::binding::isIntegralInRange ( Source value) -> bool
nodiscardconstexprnoexcept

Definition at line 174 of file numeric.cppm.

◆ isWithinValueLimits()

auto orm::db::binding::isWithinValueLimits ( const BoundValue & bound,
const BackendValueLimits & limits,
const BackendRuntimeLimits & runtime = {} ) -> bool
exportnoexcept

◆ makeNullableValue()

template<typename Wrapper, typename Value>
auto orm::db::binding::makeNullableValue ( Value value) -> Wrapper
export

Definition at line 64 of file numeric.cppm.

◆ modelResultColumns()

auto orm::db::binding::modelResultColumns ( model::ModelView model,
bool joined ) -> std::vector< ResultColumn >
inline

Definition at line 195 of file result_storage.cppm.

◆ parseNumericProjectionValue()

template<typename ResultField>
auto orm::db::binding::parseNumericProjectionValue ( const std::string & value,
const std::string & fieldName ) -> ResultField

Definition at line 65 of file result_binding.cppm.

◆ parseNumericValue()

template<typename Result>
auto orm::db::binding::parseNumericValue ( std::string_view value,
std::string_view fieldName ) -> Result

Definition at line 338 of file numeric.cppm.

◆ projectionResultColumns()

template<typename Result, typename Projections>
auto orm::db::binding::projectionResultColumns ( model::ModelView model,
const Projections & projections ) -> std::vector< ResultColumn >

Definition at line 254 of file result_storage.cppm.

◆ readProjectedValue()

template<typename ResultField>
auto orm::db::binding::readProjectedValue ( const auto & values,
const std::string & fieldName ) -> ResultField

Definition at line 96 of file result_binding.cppm.

◆ relationOwnerAlias()

auto orm::db::binding::relationOwnerAlias ( const model::ColumnView & column) -> std::string
inline

Definition at line 284 of file payload.cppm.

◆ resultSource() [1/2]

auto orm::db::binding::resultSource ( const query::detail::AggregateExpression & expression) -> db::detail::SqlSource
inline

Definition at line 230 of file result_storage.cppm.

◆ resultSource() [2/2]

auto orm::db::binding::resultSource ( const query::detail::Column & column) -> db::detail::SqlSource
inline

Definition at line 225 of file result_storage.cppm.

◆ resultSourceType()

auto orm::db::binding::resultSourceType ( const db::detail::SqlSource & source,
model::ModelView model ) -> model::ColumnType
inline

Definition at line 238 of file result_storage.cppm.

◆ setNullValue()

auto orm::db::binding::setNullValue ( soci::values & values,
const std::string & name,
model::ColumnType type ) -> void
inline

Definition at line 234 of file object_binding.cppm.

◆ setScalarFieldValue()

template<typename ModelField>
auto orm::db::binding::setScalarFieldValue ( soci::values & values,
const std::string & fieldName,
const ModelField & field,
model::ColumnType columnType,
std::optional< std::size_t > maxStringLength = std::nullopt ) -> void

Definition at line 323 of file object_binding.cppm.

◆ throwLossyNumericConversion()

auto orm::db::binding::throwLossyNumericConversion ( std::string_view fieldName) -> void
inline

Definition at line 222 of file numeric.cppm.

◆ toPrimaryKeyValue()

template<typename T>
auto orm::db::binding::toPrimaryKeyValue ( const T & value,
const std::string & fieldName ) -> query::QueryValue

Definition at line 124 of file payload.cppm.

◆ toQueryValue()

auto orm::db::binding::toQueryValue ( const query::QueryValue & value) -> query::QueryValue
inline

Definition at line 105 of file payload.cppm.

◆ tryGetNumericProjectionValue()

template<typename ResultField, typename StoredField>
auto orm::db::binding::tryGetNumericProjectionValue ( ResultField * field,
const std::string & fieldName,
const auto & values ) -> bool

Definition at line 71 of file result_binding.cppm.

◆ tryGetNumericValue()

template<typename Result, typename Stored>
auto orm::db::binding::tryGetNumericValue ( Result * result,
const auto & values,
const std::string & fieldName ) -> bool

Definition at line 402 of file numeric.cppm.

◆ validateResultIndicator()

auto orm::db::binding::validateResultIndicator ( soci::indicator indicator) -> void
inline

Definition at line 187 of file result_storage.cppm.

◆ validateStringLength()

auto orm::db::binding::validateStringLength ( std::string_view text,
std::optional< std::size_t > limit ) -> void
inline

Definition at line 272 of file object_binding.cppm.

Variable Documentation

◆ isOptional

template<typename T>
bool orm::db::binding::isOptional = IsOptional<std::remove_cv_t<T>>::value
inlineconstexpr

Definition at line 121 of file payload.cppm.