relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle > Struct Template Reference

IDENTITY constraint with configurable options. More...

#include <relx/schema/column.hpp>

Static Public Member Functions

static std::string to_sql ()
 

Static Public Attributes

static constexpr auto start = Start
 
static constexpr auto increment = Increment
 
static constexpr auto min_value = MinValue
 
static constexpr auto max_value = MaxValue
 
static constexpr bool cycle = Cycle
 

Detailed Description

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
requires ValidIdentityType<decltype(Start)> && ValidIdentityType<decltype(Increment)> && ValidIdentityType<decltype(MinValue)> && ValidIdentityType<decltype(MaxValue)>
struct relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >

IDENTITY constraint with configurable options.

Template Parameters
StartThe starting value for the identity column
IncrementThe increment value for the identity column
MinValueThe minimum value for the identity column
MaxValueThe maximum value for the identity column
CycleWhether to cycle back to MinValue when MaxValue is reached

Definition at line 46 of file column.hpp.

Member Function Documentation

◆ to_sql()

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
static std::string relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::to_sql ( )
inlinestatic

Definition at line 53 of file column.hpp.

Member Data Documentation

◆ cycle

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
constexpr bool relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::cycle = Cycle
staticconstexpr

Definition at line 51 of file column.hpp.

◆ increment

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
constexpr auto relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::increment = Increment
staticconstexpr

Definition at line 48 of file column.hpp.

◆ max_value

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
constexpr auto relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::max_value = MaxValue
staticconstexpr

Definition at line 50 of file column.hpp.

◆ min_value

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
constexpr auto relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::min_value = MinValue
staticconstexpr

Definition at line 49 of file column.hpp.

◆ start

template<auto Start = 1, auto Increment = 1, auto MinValue = std::numeric_limits<decltype(Start)>::min(), auto MaxValue = std::numeric_limits<decltype(Start)>::max(), bool Cycle = false>
constexpr auto relx::schema::identity< Start, Increment, MinValue, MaxValue, Cycle >::start = Start
staticconstexpr

Definition at line 47 of file column.hpp.


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