relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::schema Namespace Reference

Classes

struct  autoincrement
 AUTOINCREMENT constraint. More...
 
struct  check
 CHECK constraint. More...
 
class  column
 Represents a column in a database table. More...
 
class  column< TableT, Name, std::optional< T >, Modifiers... >
 
class  column_check_constraint
 Check constraint explicitly associated with a column. More...
 
struct  column_traits
 Contains schema definition components. More...
 
struct  column_traits< bool >
 
struct  column_traits< double >
 
struct  column_traits< float >
 
struct  column_traits< int >
 
struct  column_traits< long >
 
struct  column_traits< long long >
 
struct  column_traits< std::chrono::system_clock::time_point >
 Column traits for std::chrono::system_clock::time_point. More...
 
struct  column_traits< std::chrono::year_month_day >
 Column traits for std::chrono::year_month_day. More...
 
struct  column_traits< std::nullopt_t >
 
struct  column_traits< std::optional< T > >
 
struct  column_traits< std::string >
 
class  composite_foreign_key
 Represents a composite foreign key constraint with multiple columns. More...
 
class  composite_index
 Represents a composite index on multiple columns. More...
 
class  composite_primary_key
 Represents a composite primary key constraint on multiple columns. More...
 
class  composite_unique_constraint
 Represents a composite UNIQUE constraint on multiple columns. More...
 
class  create_table
 Generate CREATE TABLE SQL statement for a table struct. More...
 
struct  default_value
 DEFAULT value for non-string values. More...
 
class  drop_table
 Generate DROP TABLE SQL statement for a table struct. More...
 
struct  fixed_string
 Compile-time string type that can be used as template non-type parameter in C++20. More...
 
struct  fk_impl
 
struct  fk_impl< std::tuple< std::integral_constant< decltype(LocalColumns), LocalColumns >... >, std::tuple< std::integral_constant< decltype(ReferencedColumns), ReferencedColumns >... > >
 
class  foreign_key
 Represents a foreign key constraint on a table. More...
 
struct  identity
 IDENTITY constraint with configurable options. More...
 
class  index
 Represents an index on a table. More...
 
struct  is_default_value_specialization
 
struct  is_default_value_specialization< default_value< Value > >
 
struct  is_string_default_specialization
 
struct  is_string_default_specialization< string_default< Value, IsLiteral > >
 
struct  member_pointer_class
 Helper to extract the class type from a member pointer. More...
 
struct  member_pointer_class< T C::* >
 Specialization for extracting class type from member pointer. More...
 
struct  member_pointer_type
 Helper to extract the member type from a member pointer. More...
 
struct  member_pointer_type< T C::* >
 Specialization for extracting member type from member pointer. More...
 
struct  null_default
 NULL default for optional types. More...
 
struct  on_delete
 ON DELETE action for foreign keys. More...
 
struct  on_update
 ON UPDATE action for foreign keys. More...
 
struct  pack_element
 
struct  pack_element< 0, First, Rest... >
 
struct  pack_element< N, First, Rest... >
 
struct  primary_key
 PRIMARY KEY constraint. More...
 
struct  references
 REFERENCES constraint for foreign keys. More...
 
struct  string_default
 DEFAULT value for string literals. More...
 
class  table_check_constraint
 Check constraint that accepts a condition string at compile time. More...
 
class  table_primary_key
 Represents a primary key constraint on a table. More...
 
struct  unique
 UNIQUE constraint. More...
 
class  unique_constraint
 Represents a UNIQUE constraint on a table. More...
 

Concepts

concept  ValidIdentityType
 Concept for valid identity types.
 
concept  ColumnTypeConcept
 
concept  is_column
 Helper to detect column members in a table.
 
concept  TableConcept
 Concept for a database table type.
 
concept  is_constraint
 Helper to detect constraint members in a table.
 

Typedefs

template<auto... Args>
using fk = decltype(make_fk< Args... >())
 Type alias for foreign key using the make_fk helper.
 
template<typename T >
using member_pointer_class_t = typename member_pointer_class< T >::type
 Convenience alias for member_pointer_class.
 
template<typename T >
using member_pointer_type_t = typename member_pointer_type< T >::type
 Convenience alias for member_pointer_type.
 
template<auto... ColumnPtrs>
using pk = decltype(make_pk< ColumnPtrs... >())
 Helper type alias for primary key constraints.
 

Enumerations

enum class  reference_action {
  cascade , restrict , set_null , set_default ,
  no_action
}
 Foreign key actions. More...
 
enum class  index_type : uint8_t { normal , unique , fulltext , spatial }
 Index types. More...
 

Functions

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator== (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator!= (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator> (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator< (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator>= (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto operator<= (const column< TableT, Name, T, Modifiers... > &col, const ValueType &value)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator== (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator!= (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator> (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator< (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator>= (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator<= (const column< TableT1, Name1, T1, Modifiers1... > &col1, const column< TableT2, Name2, T2, Modifiers2... > &col2)
 
template<typename TableT , fixed_string Name, typename... Modifiers>
auto operator! (const column< TableT, Name, bool, Modifiers... > &col)
 
template<typename TableT , fixed_string Name, typename... Modifiers, query::SqlExpr Expr>
auto operator&& (const column< TableT, Name, bool, Modifiers... > &col, const Expr &expr)
 
template<query::SqlExpr Expr, typename TableT , fixed_string Name, typename... Modifiers>
auto operator&& (const Expr &expr, const column< TableT, Name, bool, Modifiers... > &col)
 
template<typename TableT , fixed_string Name, typename... Modifiers, query::SqlExpr Expr>
auto operator|| (const column< TableT, Name, bool, Modifiers... > &col, const Expr &expr)
 
template<query::SqlExpr Expr, typename TableT , fixed_string Name, typename... Modifiers>
auto operator|| (const Expr &expr, const column< TableT, Name, bool, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator== (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator!= (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator> (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator< (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator>= (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto operator<= (const ValueType &value, const column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , fixed_string Name, typename... Modifiers, typename Cond >
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto operator&& (const column< TableT, Name, bool, Modifiers... > &col, const Cond &cond)
 
template<typename TableT , fixed_string Name, typename... Modifiers, typename Cond >
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto operator|| (const column< TableT, Name, bool, Modifiers... > &col, const Cond &cond)
 
template<typename Cond , typename TableT , fixed_string Name, typename... Modifiers>
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto operator&& (const Cond &cond, const column< TableT, Name, bool, Modifiers... > &col)
 
template<typename Cond , typename TableT , fixed_string Name, typename... Modifiers>
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto operator|| (const Cond &cond, const column< TableT, Name, bool, Modifiers... > &col)
 
template<fixed_string Condition, fixed_string Name>
constexpr auto named_check ()
 Helper function to create a named check constraint at compile time.
 
template<fixed_string Condition>
constexpr auto table_check ()
 Helper function to create an unnamed check constraint at compile time.
 
template<auto ColumnPtr, fixed_string Condition>
constexpr auto column_check ()
 Helper function to create a column-bound check constraint at compile time.
 
template<auto ColumnPtr, fixed_string Condition, fixed_string Name>
constexpr auto named_column_check ()
 Helper function to create a named column-bound check constraint at compile time.
 
template<typename... Modifiers>
static std::string apply_modifiers ()
 Helper to apply all column modifiers to a SQL definition.
 
template<std::size_t N>
std::ostream & operator<< (std::ostream &os, const fixed_string< N > &str)
 
constexpr std::string_view reference_action_to_string (reference_action action)
 Convert reference action to SQL string.
 
template<auto... Args>
auto make_fk ()
 Helper function to create a foreign key.
 
template<auto... Args>
auto make_fk (reference_action on_delete, reference_action on_update)
 Helper function to create a foreign key with reference actions.
 
constexpr std::string_view index_type_to_string (index_type type)
 Convert index type to SQL string.
 
template<auto... ColumnPtrs>
auto make_pk ()
 Helper function to create a primary key.
 
template<TableConcept Table>
std::string collect_column_definitions (const Table &table_instance)
 Generate SQL column definitions from a table struct using Boost PFR.
 
template<TableConcept Table>
std::string collect_constraint_definitions (const Table &table_instance)
 Generate SQL constraint definitions from a table struct.
 

Typedef Documentation

◆ fk

template<auto... Args>
using relx::schema::fk = typedef decltype(make_fk<Args...>())

Type alias for foreign key using the make_fk helper.

Template Parameters
ArgsAll column pointers (local followed by referenced)

Definition at line 319 of file foreign_key.hpp.

◆ member_pointer_class_t

template<typename T >
using relx::schema::member_pointer_class_t = typedef typename member_pointer_class<T>::type

Convenience alias for member_pointer_class.

Template Parameters
TThe member pointer type

Definition at line 23 of file meta.hpp.

◆ member_pointer_type_t

template<typename T >
using relx::schema::member_pointer_type_t = typedef typename member_pointer_type<T>::type

Convenience alias for member_pointer_type.

Template Parameters
TThe member pointer type

Definition at line 41 of file meta.hpp.

◆ pk

template<auto... ColumnPtrs>
using relx::schema::pk = typedef decltype(make_pk<ColumnPtrs...>())

Helper type alias for primary key constraints.

Automatically selects between single-column and composite primary key based on the number of columns

Definition at line 87 of file primary_key.hpp.

Enumeration Type Documentation

◆ index_type

enum class relx::schema::index_type : uint8_t
strong

Index types.

Enumerator
normal 
unique 
fulltext 
spatial 

Definition at line 17 of file index.hpp.

◆ reference_action

enum class relx::schema::reference_action
strong

Foreign key actions.

Enumerator
cascade 
restrict 
set_null 
set_default 
no_action 

Definition at line 16 of file foreign_key.hpp.

Function Documentation

◆ apply_modifiers()

template<typename... Modifiers>
static std::string relx::schema::apply_modifiers ( )
static

Helper to apply all column modifiers to a SQL definition.

Definition at line 189 of file column.hpp.

◆ collect_column_definitions()

template<TableConcept Table>
std::string relx::schema::collect_column_definitions ( const Table &  table_instance)

Generate SQL column definitions from a table struct using Boost PFR.

Template Parameters
TableThe table struct type
Parameters
table_instanceAn instance of the table
Returns
String containing SQL column definitions

Definition at line 48 of file table.hpp.

◆ collect_constraint_definitions()

template<TableConcept Table>
std::string relx::schema::collect_constraint_definitions ( const Table &  table_instance)

Generate SQL constraint definitions from a table struct.

Template Parameters
TableThe table struct type
Parameters
table_instanceAn instance of the table
Returns
String containing SQL constraint definitions

Definition at line 81 of file table.hpp.

◆ column_check()

template<auto ColumnPtr, fixed_string Condition>
constexpr auto relx::schema::column_check ( )
constexpr

Helper function to create a column-bound check constraint at compile time.

Template Parameters
ColumnPtrPointer to the column
ConditionThe SQL condition
Returns
A column-specific check constraint

Definition at line 109 of file check_constraint.hpp.

◆ index_type_to_string()

constexpr std::string_view relx::schema::index_type_to_string ( index_type  type)
constexpr

Convert index type to SQL string.

Parameters
typeThe index type
Returns
SQL string for the index type

Definition at line 22 of file index.hpp.

◆ make_fk() [1/2]

template<auto... Args>
auto relx::schema::make_fk ( )

Helper function to create a foreign key.

Template Parameters
LocalColumnsLocal column pointers (first half of Args)
ReferencedColumnsReferenced column pointers (second half of Args)
Returns
A foreign key constraint

Definition at line 274 of file foreign_key.hpp.

◆ make_fk() [2/2]

template<auto... Args>
auto relx::schema::make_fk ( reference_action  on_delete,
reference_action  on_update 
)

Helper function to create a foreign key with reference actions.

Template Parameters
ArgsAll column pointers (local columns followed by referenced columns)
Parameters
on_deleteOn delete action
on_updateOn update action
Returns
A foreign key constraint with the specified actions

Definition at line 298 of file foreign_key.hpp.

◆ make_pk()

template<auto... ColumnPtrs>
auto relx::schema::make_pk ( )

Helper function to create a primary key.

Template Parameters
ColumnPtrsPointers to the columns that form the primary key
Returns
A primary key constraint

Definition at line 70 of file primary_key.hpp.

◆ named_check()

template<fixed_string Condition, fixed_string Name>
constexpr auto relx::schema::named_check ( )
constexpr

Helper function to create a named check constraint at compile time.

Template Parameters
ConditionThe SQL condition
NameThe constraint name
Returns
A check constraint with the given condition and name

Definition at line 92 of file check_constraint.hpp.

◆ named_column_check()

template<auto ColumnPtr, fixed_string Condition, fixed_string Name>
constexpr auto relx::schema::named_column_check ( )
constexpr

Helper function to create a named column-bound check constraint at compile time.

Template Parameters
ColumnPtrPointer to the column
ConditionThe SQL condition
NameThe constraint name
Returns
A named column-specific check constraint

Definition at line 119 of file check_constraint.hpp.

◆ operator!()

template<typename TableT , fixed_string Name, typename... Modifiers>
auto relx::schema::operator! ( const column< TableT, Name, bool, Modifiers... > &  col)

Definition at line 222 of file operators.hpp.

◆ operator!=() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator!= ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 106 of file operators.hpp.

◆ operator!=() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator!= ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 156 of file operators.hpp.

◆ operator!=() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator!= ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 267 of file operators.hpp.

◆ operator&&() [1/4]

template<typename TableT , fixed_string Name, typename... Modifiers, typename Cond >
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto relx::schema::operator&& ( const column< TableT, Name, bool, Modifiers... > &  col,
const Cond &  cond 
)

Definition at line 305 of file operators.hpp.

◆ operator&&() [2/4]

template<typename TableT , fixed_string Name, typename... Modifiers, query::SqlExpr Expr>
auto relx::schema::operator&& ( const column< TableT, Name, bool, Modifiers... > &  col,
const Expr &  expr 
)

Definition at line 230 of file operators.hpp.

◆ operator&&() [3/4]

template<typename Cond , typename TableT , fixed_string Name, typename... Modifiers>
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto relx::schema::operator&& ( const Cond &  cond,
const column< TableT, Name, bool, Modifiers... > &  col 
)

Definition at line 331 of file operators.hpp.

◆ operator&&() [4/4]

template<query::SqlExpr Expr, typename TableT , fixed_string Name, typename... Modifiers>
auto relx::schema::operator&& ( const Expr &  expr,
const column< TableT, Name, bool, Modifiers... > &  col 
)

Definition at line 237 of file operators.hpp.

◆ operator<() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator< ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 120 of file operators.hpp.

◆ operator<() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator< ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 182 of file operators.hpp.

◆ operator<() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator< ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 281 of file operators.hpp.

◆ operator<<()

template<std::size_t N>
std::ostream & relx::schema::operator<< ( std::ostream &  os,
const fixed_string< N > &  str 
)

Definition at line 57 of file fixed_string.hpp.

◆ operator<=() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator<= ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 134 of file operators.hpp.

◆ operator<=() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator<= ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 208 of file operators.hpp.

◆ operator<=() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator<= ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 295 of file operators.hpp.

◆ operator==() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator== ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 99 of file operators.hpp.

◆ operator==() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator== ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 142 of file operators.hpp.

◆ operator==() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator== ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 260 of file operators.hpp.

◆ operator>() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator> ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 113 of file operators.hpp.

◆ operator>() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator> ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 169 of file operators.hpp.

◆ operator>() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator> ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 274 of file operators.hpp.

◆ operator>=() [1/3]

template<typename TableT , fixed_string Name, typename T , typename... Modifiers, typename ValueType >
auto relx::schema::operator>= ( const column< TableT, Name, T, Modifiers... > &  col,
const ValueType &  value 
)

Definition at line 127 of file operators.hpp.

◆ operator>=() [2/3]

template<typename TableT1 , fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , fixed_string Name2, typename T2 , typename... Modifiers2>
auto relx::schema::operator>= ( const column< TableT1, Name1, T1, Modifiers1... > &  col1,
const column< TableT2, Name2, T2, Modifiers2... > &  col2 
)

Definition at line 195 of file operators.hpp.

◆ operator>=() [3/3]

template<typename ValueType , typename TableT , fixed_string Name, typename T , typename... Modifiers>
auto relx::schema::operator>= ( const ValueType &  value,
const column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 288 of file operators.hpp.

◆ operator||() [1/4]

template<typename TableT , fixed_string Name, typename... Modifiers, typename Cond >
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto relx::schema::operator|| ( const column< TableT, Name, bool, Modifiers... > &  col,
const Cond &  cond 
)

Definition at line 318 of file operators.hpp.

◆ operator||() [2/4]

template<typename TableT , fixed_string Name, typename... Modifiers, query::SqlExpr Expr>
auto relx::schema::operator|| ( const column< TableT, Name, bool, Modifiers... > &  col,
const Expr &  expr 
)

Definition at line 244 of file operators.hpp.

◆ operator||() [3/4]

template<typename Cond , typename TableT , fixed_string Name, typename... Modifiers>
requires query::SqlExpr<Cond> || (!std::same_as<Cond, bool>)
auto relx::schema::operator|| ( const Cond &  cond,
const column< TableT, Name, bool, Modifiers... > &  col 
)

Definition at line 344 of file operators.hpp.

◆ operator||() [4/4]

template<query::SqlExpr Expr, typename TableT , fixed_string Name, typename... Modifiers>
auto relx::schema::operator|| ( const Expr &  expr,
const column< TableT, Name, bool, Modifiers... > &  col 
)

Definition at line 251 of file operators.hpp.

◆ reference_action_to_string()

constexpr std::string_view relx::schema::reference_action_to_string ( reference_action  action)
constexpr

Convert reference action to SQL string.

Parameters
actionThe action to convert
Returns
SQL string for the reference action

Definition at line 21 of file foreign_key.hpp.

◆ table_check()

template<fixed_string Condition>
constexpr auto relx::schema::table_check ( )
constexpr

Helper function to create an unnamed check constraint at compile time.

Template Parameters
ConditionThe SQL condition
Returns
A check constraint with the given condition

Definition at line 100 of file check_constraint.hpp.