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

#include <sqt/orm/expression/operand/constant_operand.h>

Description

template<ValueTraitsType TRAITS>
class sqt::ConstantOperand< TRAITS >

Represents a constant value operand.

Template Parameters
TRAITSThe value traits type this operand represents, which must satisfy the sqt::ValueTraitsType concept.

Literals or variables used to create expressions become constant operands. The values are stored in the constant operand, and won't be changed.

Constant operands in a querier are inline parameters, their values will be bound to the SQL statement by the BindInlineParameters() method of the querier before it is executed.

This class template satisfies the sqt::ValueOperandType concept.

See also
sqt::ValueOperandType
sqt::ValueTraitsType

Public Types

using ValueTraits = TRAITS
using ValueType = typename TRAITS::ValueType

Static Public Member Functions

static std::string BuildSQL ()
static constexpr std::tuple BuildPlaceholderBinders (int parameter_index) noexcept

Public Member Functions

constexpr ConstantOperand (ValueType value)
void BindInlineParameters (Statement &statement, int parameter_index) const

Static Public Attributes

static constexpr std::size_t ParameterCount = internal::ParameterCountForV<TRAITS>