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

Namespaces

namespace  aggregate_checking
 Type checking concepts for aggregate functions.
 
namespace  arithmetic_checking
 Type checking for arithmetic operations.
 
namespace  date_checking
 Type checking concepts for date/time operations.
 
namespace  literals
 Literals namespace for SQL value literals.
 
namespace  meta
 

Classes

class  AliasedColumn
 Column with an alias. More...
 
class  ArithmeticExpr
 Binary arithmetic expression. More...
 
class  AscendingExpr
 Helper for creating an ascending order by expression. More...
 
class  BetweenCondition
 BETWEEN condition (col BETWEEN lower AND upper) More...
 
class  BinaryCondition
 Generic binary condition expression. More...
 
class  BinaryDateFunctionExpr
 Binary date function expression (e.g., DATE_DIFF) More...
 
class  CaseExpr
 
struct  class_of_t
 Helper to extract class type from a member pointer. More...
 
struct  class_of_t< T Class::* >
 
class  CoalesceExpr
 COALESCE function. More...
 
struct  column_type_of
 Helper to extract column type from member pointer. More...
 
class  ColumnExpression
 Base class for column expressions. More...
 
class  ColumnRef
 Column reference expression. More...
 
class  CountAllExpr
 Expression representing COUNT(*) in SQL. More...
 
class  CurrentDateTimeExpr
 Current date/time functions (no arguments) More...
 
class  DateArithmeticExpr
 Date addition/subtraction expression. More...
 
class  DeleteQuery
 Base DELETE query builder. More...
 
class  DescendingExpr
 Helper for creating a descending order by expression. More...
 
class  DistinctExpr
 DISTINCT qualifier for an expression. More...
 
class  FunctionExpr
 Base class for SQL function expressions. More...
 
class  InCondition
 Original IN condition for backward compatibility. More...
 
struct  InsertItem
 Represents a single column-value pair for an INSERT statement. More...
 
class  InsertQuery
 Base INSERT query builder. More...
 
class  IntervalExpr
 Date interval expression for date arithmetic. More...
 
class  IsNotNullCondition
 IS NOT NULL condition. More...
 
class  IsNullCondition
 IS NULL condition. More...
 
struct  JoinSpec
 relx Query Module More...
 
class  LikeCondition
 LIKE condition (col LIKE pattern) More...
 
class  NotCondition
 Negation condition (NOT expr) More...
 
class  NullaryFunctionExpr
 Base class for SQL function expressions with no arguments. More...
 
struct  QueryError
 Error type for query operations. More...
 
class  SchemaColumnAdapter
 Adapter to convert schema::column to a ColumnRef This allows direct use of schema columns in query expressions. More...
 
class  SchemaTableAdapter
 Adapter to convert schema::table to work with query builder This maintains table name and enables column access with SQL expression support. More...
 
class  SelectQuery
 Base SELECT query builder. More...
 
struct  SetItem
 Represents a SET clause assignment in an UPDATE statement. More...
 
struct  SqlExpression
 Base class for SQL expressions. More...
 
class  TypedCaseBuilder
 
class  TypedInCondition
 IN condition (col IN (values)) with type checking. More...
 
class  UnaryDateFunctionExpr
 Unary date function expression with unit (e.g., EXTRACT) More...
 
class  UpdateQuery
 Base UPDATE query builder. More...
 
class  Value
 Represents a literal value in a SQL query. More...
 
class  Value< const char * >
 Specialization for C-style string literals (const char*) More...
 
class  Value< std::optional< T > >
 Specialization for std::optional values. More...
 
class  Value< std::string >
 Specialization for std::string values. More...
 
class  Value< std::string_view >
 Specialization for std::string_view values. More...
 

Concepts

concept  SqlExpr
 Concept for SQL expression components.
 
concept  TableType
 Concept for database table types.
 
concept  ColumnType
 Concept for column types.
 
concept  ColumnList
 Concept for a sequence of column references.
 
concept  TableList
 Concept for a sequence of table references.
 
concept  ConditionExpr
 Concept for a condition expression.
 

Typedefs

template<typename T >
using QueryResult = std::expected< T, QueryError >
 Type alias for result of query operations.
 
using CaseBuilder = TypedCaseBuilder< void >
 
template<typename T >
using class_of_t_t = typename class_of_t< T >::type
 

Enumerations

enum class  JoinType {
  Inner , Left , Right , Full ,
  Cross
}
 Types of JOIN operations. More...
 

Functions

template<typename TableT1 , schema::fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , schema::fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator+ (const schema::column< TableT1, Name1, T1, Modifiers1... > &left, const schema::column< TableT2, Name2, T2, Modifiers2... > &right)
 Addition operator for columns with type checking.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator+ (const schema::column< TableT, Name, T, Modifiers... > &left, ValueT &&value)
 Addition operator for column with value.
 
template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator+ (ValueT &&value, const schema::column< TableT, Name, T, Modifiers... > &right)
 Addition operator for value with column (reversed)
 
template<typename TableT1 , schema::fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , schema::fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator- (const schema::column< TableT1, Name1, T1, Modifiers1... > &left, const schema::column< TableT2, Name2, T2, Modifiers2... > &right)
 Subtraction operator for columns.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator- (const schema::column< TableT, Name, T, Modifiers... > &left, ValueT &&value)
 Subtraction operator for column with value.
 
template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator- (ValueT &&value, const schema::column< TableT, Name, T, Modifiers... > &right)
 Subtraction operator for value with column (reversed)
 
template<typename TableT1 , schema::fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , schema::fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator* (const schema::column< TableT1, Name1, T1, Modifiers1... > &left, const schema::column< TableT2, Name2, T2, Modifiers2... > &right)
 Multiplication operator for columns.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator* (const schema::column< TableT, Name, T, Modifiers... > &left, ValueT &&value)
 Multiplication operator for column with value.
 
template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator* (ValueT &&value, const schema::column< TableT, Name, T, Modifiers... > &right)
 Multiplication operator for value with column (reversed)
 
template<typename TableT1 , schema::fixed_string Name1, typename T1 , typename... Modifiers1, typename TableT2 , schema::fixed_string Name2, typename T2 , typename... Modifiers2>
auto operator/ (const schema::column< TableT1, Name1, T1, Modifiers1... > &left, const schema::column< TableT2, Name2, T2, Modifiers2... > &right)
 Division operator for columns.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator/ (const schema::column< TableT, Name, T, Modifiers... > &left, ValueT &&value)
 Division operator for column with value.
 
template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator/ (ValueT &&value, const schema::column< TableT, Name, T, Modifiers... > &right)
 Division operator for value with column (reversed)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator+ (const ArithmeticExpr< Left, Right > &left_expr, const schema::column< TableT, Name, T, Modifiers... > &right)
 Addition operator for ArithmeticExpr with column.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto operator+ (const schema::column< TableT, Name, T, Modifiers... > &left, const ArithmeticExpr< Left, Right > &right_expr)
 Addition operator for column with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator+ (const ArithmeticExpr< Left, Right > &left_expr, ValueT &&value)
 Addition operator for ArithmeticExpr with value.
 
template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator+ (ValueT &&value, const ArithmeticExpr< Left, Right > &right_expr)
 Addition operator for value with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator- (const ArithmeticExpr< Left, Right > &left_expr, const schema::column< TableT, Name, T, Modifiers... > &right)
 Subtraction operator for ArithmeticExpr with column.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto operator- (const schema::column< TableT, Name, T, Modifiers... > &left, const ArithmeticExpr< Left, Right > &right_expr)
 Subtraction operator for column with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator- (const ArithmeticExpr< Left, Right > &left_expr, ValueT &&value)
 Subtraction operator for ArithmeticExpr with value.
 
template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator- (ValueT &&value, const ArithmeticExpr< Left, Right > &right_expr)
 Subtraction operator for value with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator* (const ArithmeticExpr< Left, Right > &left_expr, const schema::column< TableT, Name, T, Modifiers... > &right)
 Multiplication operator for ArithmeticExpr with column.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto operator* (const schema::column< TableT, Name, T, Modifiers... > &left, const ArithmeticExpr< Left, Right > &right_expr)
 Multiplication operator for column with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator* (const ArithmeticExpr< Left, Right > &left_expr, ValueT &&value)
 Multiplication operator for ArithmeticExpr with value.
 
template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator* (ValueT &&value, const ArithmeticExpr< Left, Right > &right_expr)
 Multiplication operator for value with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator/ (const ArithmeticExpr< Left, Right > &left_expr, const schema::column< TableT, Name, T, Modifiers... > &right)
 Division operator for ArithmeticExpr with column.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto operator/ (const schema::column< TableT, Name, T, Modifiers... > &left, const ArithmeticExpr< Left, Right > &right_expr)
 Division operator for column with ArithmeticExpr.
 
template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator/ (const ArithmeticExpr< Left, Right > &left_expr, ValueT &&value)
 Division operator for ArithmeticExpr with value.
 
template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto operator/ (ValueT &&value, const query::ArithmeticExpr< Left, Right > &right_expr)
 Division operator for value with ArithmeticExpr.
 
template<ColumnType Column>
auto column_ref (const Column &col)
 Create a column reference expression.
 
template<SqlExpr Expr>
auto as (const Expr &expr, std::string alias)
 Create an aliased column expression.
 
template<ColumnType Column>
auto as (const Column &column, std::string alias)
 Create an aliased column expression from a column reference.
 
template<SqlExpr Left, SqlExpr Right>
auto operator== (Left left, Right right)
 Equality condition (col = value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator!= (Left left, Right right)
 Inequality condition (col != value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator> (Left left, Right right)
 Greater than condition (col > value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator< (Left left, Right right)
 Less than condition (col < value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator>= (Left left, Right right)
 Greater than or equal condition (col >= value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator<= (Left left, Right right)
 Less than or equal condition (col <= value)
 
template<SqlExpr Left, SqlExpr Right>
auto operator&& (Left left, Right right)
 Logical AND condition.
 
template<SqlExpr Left, SqlExpr Right>
auto operator|| (Left left, Right right)
 Logical OR condition.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, std::ranges::range Range>
requires std::convertible_to<std::ranges::range_value_t<Range>, std::string>
auto in (const schema::column< TableT, Name, T, Modifiers... > &col, Range values)
 Create an IN condition with type checking for columns.
 
template<SqlExpr Expr, std::ranges::range Range>
requires std::convertible_to<std::ranges::range_value_t<Range>, std::string>
auto in (Expr expr, Range values)
 Create an IN condition for expressions.
 
template<SqlExpr Expr>
auto like (Expr expr, std::string pattern)
 Create a LIKE condition.
 
template<SqlExpr Expr>
auto between (Expr expr, std::string lower, std::string upper)
 Create a BETWEEN condition.
 
template<SqlExpr Expr>
auto is_null (Expr expr)
 Create an IS NULL condition.
 
template<SqlExpr Expr>
auto is_not_null (Expr expr)
 Create an IS NOT NULL condition.
 
template<SqlExpr Expr>
auto operator! (Expr expr)
 Logical NOT operator.
 
std::string join_type_to_string (JoinType type)
 Convert a JoinType to its SQL string representation.
 
template<SqlExpr Expr1, SqlExpr Expr2>
auto date_diff (std::string_view unit, Expr1 date1, Expr2 date2)
 DATE_DIFF function - calculates difference between two dates.
 
template<typename T1 , typename T2 >
requires date_checking::DateTimeColumn<T1> && date_checking::DateTimeColumn<T2>
auto date_diff (std::string_view unit, const T1 &col1, const T2 &col2)
 
template<typename T , SqlExpr Expr>
requires date_checking::DateTimeColumn<T>
auto date_diff (std::string_view unit, const T &column, Expr expr)
 
template<SqlExpr Expr, typename T >
requires date_checking::DateTimeColumn<T>
auto date_diff (std::string_view unit, Expr expr, const T &column)
 
template<SqlExpr DateExpr>
auto date_add (DateExpr date_expr, IntervalExpr interval_expr)
 DATE_ADD function - adds an interval to a date.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto date_add (const T &column, IntervalExpr interval_expr)
 
template<SqlExpr DateExpr>
auto date_sub (DateExpr date_expr, IntervalExpr interval_expr)
 DATE_SUB function - subtracts an interval from a date.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto date_sub (const T &column, IntervalExpr interval_expr)
 
template<SqlExpr Expr>
auto extract (std::string_view unit, Expr expr)
 EXTRACT function - extracts a date part from a date.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto extract (std::string_view unit, const T &column)
 
template<SqlExpr Expr>
auto date_trunc (std::string_view unit, Expr expr)
 DATE_TRUNC function - truncates a date to specified precision.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto date_trunc (std::string_view unit, const T &column)
 
auto interval (std::string_view interval_str)
 Create an interval expression.
 
auto current_date ()
 CURRENT_DATE function - returns the current date.
 
auto current_time ()
 CURRENT_TIME function - returns the current time.
 
auto current_timestamp ()
 CURRENT_TIMESTAMP function - returns the current timestamp.
 
auto now ()
 NOW function - alias for CURRENT_TIMESTAMP.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto age_in_years (const T &birth_date_column)
 Calculate age in years between birth date and current date.
 
template<SqlExpr Expr>
auto age_in_years (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto days_since (const T &date_column)
 Calculate days since a date.
 
template<SqlExpr Expr>
auto days_since (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto days_until (const T &date_column)
 Calculate days until a date.
 
template<SqlExpr Expr>
auto days_until (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto start_of_year (const T &date_column)
 Get the start of the year for a date.
 
template<SqlExpr Expr>
auto start_of_year (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto start_of_month (const T &date_column)
 Get the start of the month for a date.
 
template<SqlExpr Expr>
auto start_of_month (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto start_of_day (const T &date_column)
 Get the start of the day for a date.
 
template<SqlExpr Expr>
auto start_of_day (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto year (const T &date_column)
 Get the year from a date.
 
template<SqlExpr Expr>
auto year (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto month (const T &date_column)
 Get the month from a date.
 
template<SqlExpr Expr>
auto month (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto day (const T &date_column)
 Get the day from a date.
 
template<SqlExpr Expr>
auto day (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto day_of_week (const T &date_column)
 Get the day of week from a date (0=Sunday, 1=Monday, etc.)
 
template<SqlExpr Expr>
auto day_of_week (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto day_of_year (const T &date_column)
 Get the day of year from a date (1-366)
 
template<SqlExpr Expr>
auto day_of_year (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto hour (const T &date_column)
 Get the hour from a timestamp.
 
template<SqlExpr Expr>
auto hour (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto minute (const T &date_column)
 Get the minute from a timestamp.
 
template<SqlExpr Expr>
auto minute (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto second (const T &date_column)
 Get the second from a timestamp.
 
template<SqlExpr Expr>
auto second (Expr expr)
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto operator+ (const T &date_column, const IntervalExpr &interval_expr)
 Addition operator for date column + interval.
 
template<SqlExpr DateExpr>
auto operator+ (DateExpr date_expr, const IntervalExpr &interval_expr)
 Addition operator for date expression + interval.
 
template<typename T >
requires date_checking::DateTimeColumn<T>
auto operator- (const T &date_column, const IntervalExpr &interval_expr)
 Subtraction operator for date column - interval.
 
template<SqlExpr DateExpr>
auto operator- (DateExpr date_expr, const IntervalExpr &interval_expr)
 Subtraction operator for date expression - interval.
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr1>
auto operator+ (const DateArithmeticExpr< DateExpr, IntervalExpr1 > &date_expr, const IntervalExpr &interval_expr)
 Addition operator for DateArithmeticExpr + interval (chaining)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr1>
auto operator- (const DateArithmeticExpr< DateExpr, IntervalExpr1 > &date_expr, const IntervalExpr &interval_expr)
 Subtraction operator for DateArithmeticExpr - interval (chaining)
 
template<SqlExpr Expr>
auto abs (Expr expr)
 ABS function for SQL expressions.
 
template<SqlExpr Expr1, SqlExpr Expr2>
auto operator- (const UnaryDateFunctionExpr< Expr1 > &left, const UnaryDateFunctionExpr< Expr2 > &right)
 Subtraction operator for two UnaryDateFunctionExpr.
 
template<SqlExpr Expr1, SqlExpr Expr2>
auto operator+ (const UnaryDateFunctionExpr< Expr1 > &left, const UnaryDateFunctionExpr< Expr2 > &right)
 Addition operator for two UnaryDateFunctionExpr.
 
template<TableType Table>
auto delete_from (const Table &table)
 Create a DELETE query for the specified table.
 
auto count_all ()
 COUNT(*) aggregate function.
 
template<SqlExpr Expr>
auto count (Expr expr)
 COUNT aggregate function.
 
template<typename T >
requires ColumnType<T>
auto count (const T &column)
 
template<SqlExpr Expr>
auto count_distinct (Expr expr)
 COUNT(DISTINCT expr) aggregate function.
 
template<typename T >
requires ColumnType<T>
auto count_distinct (const T &column)
 
template<SqlExpr Expr>
auto sum (Expr expr)
 SUM aggregate function.
 
template<typename T >
requires ColumnType<T>
auto sum (const T &column)
 
template<SqlExpr Expr>
auto avg (Expr expr)
 AVG aggregate function.
 
template<typename T >
requires ColumnType<T>
auto avg (const T &column)
 
template<SqlExpr Expr>
auto min (Expr expr)
 MIN aggregate function.
 
template<typename T >
requires ColumnType<T>
auto min (const T &column)
 
template<SqlExpr Expr>
auto max (Expr expr)
 MAX aggregate function.
 
template<typename T >
requires ColumnType<T>
auto max (const T &column)
 
template<SqlExpr Expr>
auto distinct (Expr expr)
 Create a DISTINCT expression.
 
template<typename T >
requires ColumnType<T>
auto distinct (const T &column)
 
template<SqlExpr Expr>
auto lower (Expr expr)
 LOWER string function.
 
template<typename T >
requires ColumnType<T>
auto lower (const T &column)
 
template<SqlExpr Expr>
auto upper (Expr expr)
 UPPER string function.
 
template<typename T >
requires ColumnType<T>
auto upper (const T &column)
 
template<SqlExpr Expr>
auto length (Expr expr)
 LENGTH string function.
 
template<typename T >
requires ColumnType<T>
auto length (const T &column)
 
template<SqlExpr Expr>
auto trim (Expr expr)
 TRIM string function.
 
template<typename T >
requires ColumnType<T>
auto trim (const T &column)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto coalesce (First first, Second second, Rest... rest)
 Create a COALESCE expression.
 
template<typename T , SqlExpr Second, SqlExpr... Rest>
requires ColumnType<T>
auto coalesce (const T &column, Second second, Rest... rest)
 
template<typename T1 , typename T2 , SqlExpr... Rest>
requires ColumnType<T1> && ColumnType<T2>
auto coalesce (const T1 &column1, const T2 &column2, Rest... rest)
 
template<typename T >
requires ColumnType<T>
auto coalesce (const T &column, const char *str)
 
template<typename T >
requires ColumnType<T>
auto coalesce (const T &column, const std::string &str)
 
template<typename T1 , typename T2 >
requires ColumnType<T1> && ColumnType<T2>
auto coalesce (const T1 &column1, const T2 &column2, const char *str)
 
auto case_ ()
 Create a CASE expression with type checking.
 
auto as (CaseExpr &&expr, std::string alias)
 
template<typename Columns , TableType Table>
auto from (const SelectQuery< Columns > &query, const Table &table)
 FROM extension for schema tables with automatic adapter creation.
 
template<typename Columns , typename Tables , typename Joins , typename Where , typename GroupBys , typename OrderBys , typename HavingCond , typename LimitVal , typename OffsetVal , TableType Table, ConditionExpr Condition>
auto join (const SelectQuery< Columns, Tables, Joins, Where, GroupBys, OrderBys, HavingCond, LimitVal, OffsetVal > &query, const Table &table, Condition cond, JoinType type=JoinType::Inner)
 JOIN extension for schema tables with automatic adapter creation.
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, const char *value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, const std::string &value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, int value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, long value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, long long value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, double value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, float value)
 
auto when (CaseBuilder &builder, const ConditionExpr auto &condition, bool value)
 
auto else_ (CaseBuilder &builder, const char *value)
 
auto else_ (CaseBuilder &builder, const std::string &value)
 
auto else_ (CaseBuilder &builder, int value)
 
auto else_ (CaseBuilder &builder, long value)
 
auto else_ (CaseBuilder &builder, long long value)
 
auto else_ (CaseBuilder &builder, double value)
 
auto else_ (CaseBuilder &builder, float value)
 
auto else_ (CaseBuilder &builder, bool value)
 
template<TableType Table>
auto insert_into (const Table &table)
 Create an INSERT query for the specified table.
 
template<typename Tuple >
static constexpr bool is_empty_tuple ()
 Helper to check if a tuple is empty.
 
template<typename Tuple >
std::string tuple_to_sql (const Tuple &tuple, const char *separator)
 Helper to convert a tuple of expressions to SQL.
 
template<typename Tuple >
std::vector< std::string > tuple_bind_params (const Tuple &tuple)
 Helper to collect bind parameters from a tuple of expressions.
 
template<typename Func , typename Tuple >
static void apply_tuple (Func &&func, const Tuple &tuple)
 Helper to apply a function to each element of a tuple.
 
template<auto MemberPtr>
constexpr auto column_name_of ()
 Helper to get column name from member pointer.
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator== (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator!= (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator> (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator< (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator>= (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
auto operator<= (const schema::column< TableT, Name, T, Modifiers... > &col, const Value< ValueT > &value)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator== (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator!= (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator> (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator< (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator>= (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator<= (const schema::column< TableT, Name, T, Modifiers... > &col, LiteralT &&literal)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator== (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator!= (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator> (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator< (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator>= (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator<= (LiteralT &&literal, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator== (const schema::column< TableT, Name, T, Modifiers... > &col, const char *str)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator!= (const schema::column< TableT, Name, T, Modifiers... > &col, const char *str)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator== (const char *str, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto operator!= (const char *str, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto like (const schema::column< TableT, Name, T, Modifiers... > &col, std::string pattern)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto is_null (const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto is_not_null (const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto between (const schema::column< TableT, Name, T, Modifiers... > &col, std::string lower, std::string upper)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ResultT >
auto when (const schema::column< TableT, Name, T, Modifiers... > &condition, const query::Value< ResultT > &result)
 
template<typename CondT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto when (const CondT &condition, const schema::column< TableT, Name, T, Modifiers... > &result)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto else_ (const schema::column< TableT, Name, T, Modifiers... > &result)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename... Args>
auto select_expr (const schema::column< TableT, Name, T, Modifiers... > &col, Args &&... args)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator== (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator!= (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator> (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator< (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator>= (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator<= (const SchemaColumnAdapter< Column > &col, LiteralT &&literal)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator== (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator!= (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator> (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator< (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator>= (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto operator<= (LiteralT &&literal, const SchemaColumnAdapter< Column > &col)
 
template<typename Column >
auto operator== (const SchemaColumnAdapter< Column > &col, const char *str)
 
template<typename Column >
auto operator!= (const SchemaColumnAdapter< Column > &col, const char *str)
 
template<typename Column >
auto operator== (const char *str, const SchemaColumnAdapter< Column > &col)
 
template<typename Column >
auto operator!= (const char *str, const SchemaColumnAdapter< Column > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr>
auto operator== (const AliasedColumn< Expr > &col, const char *str)
 
template<SqlExpr Expr>
auto operator== (const char *str, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr>
auto operator!= (const AliasedColumn< Expr > &col, const char *str)
 
template<SqlExpr Expr>
auto operator!= (const char *str, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (const AliasedColumn< Expr > &col, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (LiteralT &&literal, const AliasedColumn< Expr > &col)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr>
auto operator== (const FunctionExpr< Expr > &func, const char *str)
 
template<SqlExpr Expr>
auto operator== (const char *str, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr>
auto operator!= (const FunctionExpr< Expr > &func, const char *str)
 
template<SqlExpr Expr>
auto operator!= (const char *str, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (const FunctionExpr< Expr > &func, LiteralT &&literal)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (LiteralT &&literal, const FunctionExpr< Expr > &func)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (const CoalesceExpr< First, Second, Rest... > &coalesce, LiteralT &&literal)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (LiteralT &&literal, const CoalesceExpr< First, Second, Rest... > &coalesce)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto operator== (const CoalesceExpr< First, Second, Rest... > &coalesce, const char *str)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto operator== (const char *str, const CoalesceExpr< First, Second, Rest... > &coalesce)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (const CoalesceExpr< First, Second, Rest... > &coalesce, LiteralT &&literal)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (LiteralT &&literal, const CoalesceExpr< First, Second, Rest... > &coalesce)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto operator!= (const CoalesceExpr< First, Second, Rest... > &coalesce, const char *str)
 
template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto operator!= (const char *str, const CoalesceExpr< First, Second, Rest... > &coalesce)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator== (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator!= (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator> (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator< (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator>= (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (const CountAllExpr &expr, LiteralT &&literal)
 
template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto operator<= (LiteralT &&literal, const CountAllExpr &expr)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator> (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator< (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator>= (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator<= (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator== (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator!= (const CurrentDateTimeExpr &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator> (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator< (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator>= (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator<= (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator== (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator!= (const UnaryDateFunctionExpr< Expr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator> (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator< (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator>= (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator<= (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator== (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator!= (const BinaryDateFunctionExpr< Left, Right > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator> (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator< (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator>= (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator<= (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator== (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto operator!= (const DateArithmeticExpr< DateExpr, IntervalExpr > &expr, const schema::column< TableT, Name, T, Modifiers... > &col)
 
template<ColumnType C>
auto to_expr (const C &col, std::string_view table_name="")
 Helper to wrap a schema column in a SQL expression.
 
template<TableType T>
auto to_table (const T &table)
 Helper to wrap a schema table in a table adapter.
 
template<ConditionExpr Condition>
auto on (Condition cond)
 Create a join condition with the ON clause.
 
template<typename... Args>
auto select (const Args &... args)
 Create a column reference from a member pointer without requiring a table instance.
 
template<typename... Args>
auto select_expr (const Args &... args)
 Create a SELECT query with the specified column expressions (alias for select)
 
template<SqlExpr Expr>
auto desc (Expr expr)
 Create a descending order by expression.
 
template<typename T >
requires ColumnType<T>
auto desc (const T &column)
 
template<SqlExpr Expr>
auto asc (Expr expr)
 Create an ascending order by expression.
 
template<typename T >
requires ColumnType<T>
auto asc (const T &column)
 Create an ascending order by expression for a column.
 
template<TableType Table>
auto select_all (const Table &table)
 
template<TableType Table>
auto select_all ()
 Create a SELECT * query without requiring a table instance.
 
template<typename... Args>
auto select_distinct (const Args &... args)
 Create a SELECT DISTINCT query with the specified columns or expressions.
 
template<SqlExpr... Args>
auto select_distinct_expr (const Args &... args)
 Create a SELECT DISTINCT query with the specified column expressions.
 
template<TableType Table>
auto select_distinct_all (const Table &table)
 Create a SELECT * query that uses DISTINCT.
 
template<TableType Table>
auto select_distinct_all ()
 Create a SELECT DISTINCT * query without requiring a table instance.
 
template<TableType Table>
auto update (const Table &table)
 Create an UPDATE query for the specified table.
 
template<typename T >
auto value (T val)
 Create a value expression.
 
auto val (const char *str)
 Helper to create a value expression from a string literal.
 
auto val (std::string str)
 Helper to create a value expression from a string.
 
auto val (std::string_view sv)
 Helper to create a value expression from a string_view.
 
auto val (int i)
 Helper to create a value expression from an int.
 
auto val (long l)
 Helper to create a value expression from a long.
 
auto val (long long ll)
 Helper to create a value expression from a long long.
 
auto val (double d)
 Helper to create a value expression from a double.
 
auto val (float f)
 Helper to create a value expression from a float.
 
auto val (bool b)
 Helper to create a value expression from a bool.
 
template<typename T >
auto val (std::optional< T > opt)
 Helper to create a value expression from an optional.
 
auto val (std::nullopt_t)
 Helper to create a value expression from a nullopt.
 

Typedef Documentation

◆ CaseBuilder

Definition at line 649 of file function.hpp.

◆ class_of_t_t

template<typename T >
using relx::query::class_of_t_t = typedef typename class_of_t<T>::type

Definition at line 66 of file meta.hpp.

◆ QueryResult

template<typename T >
using relx::query::QueryResult = typedef std::expected<T, QueryError>

Type alias for result of query operations.

Definition at line 25 of file core.hpp.

Enumeration Type Documentation

◆ JoinType

enum class relx::query::JoinType
strong

Types of JOIN operations.

Enumerator
Inner 
Left 
Right 
Full 
Cross 

Definition at line 68 of file core.hpp.

Function Documentation

◆ abs()

template<SqlExpr Expr>
auto relx::query::abs ( Expr  expr)

ABS function for SQL expressions.

Template Parameters
ExprSQL expression type
Parameters
exprSQL expression
Returns
A UnaryDateFunctionExpr representing ABS(expr)

Definition at line 833 of file date.hpp.

◆ age_in_years() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::age_in_years ( const T &  birth_date_column)

Calculate age in years between birth date and current date.

Template Parameters
TDate column type
Parameters
birth_date_columnBirth date column
Returns
Date difference expression in years

Definition at line 564 of file date.hpp.

◆ age_in_years() [2/2]

template<SqlExpr Expr>
auto relx::query::age_in_years ( Expr  expr)

Definition at line 570 of file date.hpp.

◆ apply_tuple()

template<typename Func , typename Tuple >
static void relx::query::apply_tuple ( Func &&  func,
const Tuple &  tuple 
)
static

Helper to apply a function to each element of a tuple.

Definition at line 52 of file meta.hpp.

◆ as() [1/3]

auto relx::query::as ( CaseExpr &&  expr,
std::string  alias 
)
inline

Definition at line 659 of file function.hpp.

◆ as() [2/3]

template<ColumnType Column>
auto relx::query::as ( const Column &  column,
std::string  alias 
)

Create an aliased column expression from a column reference.

Template Parameters
ColumnThe column type
Parameters
columnThe column reference
aliasThe alias name
Returns
An AliasedColumn expression

Definition at line 114 of file column_expression.hpp.

◆ as() [3/3]

template<SqlExpr Expr>
auto relx::query::as ( const Expr &  expr,
std::string  alias 
)

Create an aliased column expression.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to alias
aliasThe alias name
Returns
An AliasedColumn expression

Definition at line 104 of file column_expression.hpp.

◆ asc() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::asc ( const T &  column)

Create an ascending order by expression for a column.

Template Parameters
TThe column type
Parameters
columnThe column to order by
Returns
An AscendingExpr object

Definition at line 596 of file select.hpp.

◆ asc() [2/2]

template<SqlExpr Expr>
auto relx::query::asc ( Expr  expr)

Create an ascending order by expression.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to order by
Returns
An AscendingExpr object

Definition at line 586 of file select.hpp.

◆ avg() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::avg ( const T &  column)

Definition at line 173 of file function.hpp.

◆ avg() [2/2]

template<SqlExpr Expr>
auto relx::query::avg ( Expr  expr)

AVG aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to average
Returns
A FunctionExpr representing AVG(expr)

Definition at line 166 of file function.hpp.

◆ between() [1/2]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::between ( const schema::column< TableT, Name, T, Modifiers... > &  col,
std::string  lower,
std::string  upper 
)

Definition at line 618 of file operators.hpp.

◆ between() [2/2]

template<SqlExpr Expr>
auto relx::query::between ( Expr  expr,
std::string  lower,
std::string  upper 
)

Create a BETWEEN condition.

Template Parameters
ExprThe expression type
Parameters
exprThe column or expression
lowerThe lower bound
upperThe upper bound
Returns
A BetweenCondition expression

Definition at line 254 of file condition.hpp.

◆ case_()

auto relx::query::case_ ( )
inline

Create a CASE expression with type checking.

Returns
A TypedCaseBuilder

Definition at line 654 of file function.hpp.

◆ coalesce() [1/6]

template<typename T >
requires ColumnType<T>
auto relx::query::coalesce ( const T &  column,
const char *  str 
)

Definition at line 431 of file function.hpp.

◆ coalesce() [2/6]

template<typename T >
requires ColumnType<T>
auto relx::query::coalesce ( const T &  column,
const std::string &  str 
)

Definition at line 438 of file function.hpp.

◆ coalesce() [3/6]

template<typename T , SqlExpr Second, SqlExpr... Rest>
requires ColumnType<T>
auto relx::query::coalesce ( const T &  column,
Second  second,
Rest...  rest 
)

Definition at line 417 of file function.hpp.

◆ coalesce() [4/6]

template<typename T1 , typename T2 >
requires ColumnType<T1> && ColumnType<T2>
auto relx::query::coalesce ( const T1 &  column1,
const T2 &  column2,
const char *  str 
)

Definition at line 445 of file function.hpp.

◆ coalesce() [5/6]

template<typename T1 , typename T2 , SqlExpr... Rest>
requires ColumnType<T1> && ColumnType<T2>
auto relx::query::coalesce ( const T1 &  column1,
const T2 &  column2,
Rest...  rest 
)

Definition at line 424 of file function.hpp.

◆ coalesce() [6/6]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto relx::query::coalesce ( First  first,
Second  second,
Rest...  rest 
)

Create a COALESCE expression.

Template Parameters
FirstThe first expression type
SecondThe second expression type
RestThe types of the remaining expressions
Parameters
firstThe first expression
secondThe second expression
restThe remaining expressions
Returns
A CoalesceExpr

Definition at line 409 of file function.hpp.

◆ column_name_of()

template<auto MemberPtr>
constexpr auto relx::query::column_name_of ( )
constexpr

Helper to get column name from member pointer.

Definition at line 77 of file meta.hpp.

◆ column_ref()

template<ColumnType Column>
auto relx::query::column_ref ( const Column &  col)

Create a column reference expression.

Template Parameters
ColumnThe column type
Parameters
colThe column
Returns
A ColumnRef expression

Definition at line 66 of file column_expression.hpp.

◆ count() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::count ( const T &  column)

Definition at line 88 of file function.hpp.

◆ count() [2/2]

template<SqlExpr Expr>
auto relx::query::count ( Expr  expr)

COUNT aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to count
Returns
A FunctionExpr representing COUNT(expr)

Definition at line 81 of file function.hpp.

◆ count_all()

auto relx::query::count_all ( )
inline

COUNT(*) aggregate function.

Returns
A NullaryFunctionExpr representing COUNT(*)

Definition at line 72 of file function.hpp.

◆ count_distinct() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::count_distinct ( const T &  column)

Definition at line 104 of file function.hpp.

◆ count_distinct() [2/2]

template<SqlExpr Expr>
auto relx::query::count_distinct ( Expr  expr)

COUNT(DISTINCT expr) aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to count distinct values of
Returns
A FunctionExpr representing COUNT(DISTINCT expr)

Definition at line 97 of file function.hpp.

◆ current_date()

auto relx::query::current_date ( )
inline

CURRENT_DATE function - returns the current date.

Returns
A CurrentDateTimeExpr representing CURRENT_DATE

Definition at line 534 of file date.hpp.

◆ current_time()

auto relx::query::current_time ( )
inline

CURRENT_TIME function - returns the current time.

Returns
A CurrentDateTimeExpr representing CURRENT_TIME

Definition at line 540 of file date.hpp.

◆ current_timestamp()

auto relx::query::current_timestamp ( )
inline

CURRENT_TIMESTAMP function - returns the current timestamp.

Returns
A CurrentDateTimeExpr representing CURRENT_TIMESTAMP

Definition at line 546 of file date.hpp.

◆ date_add() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::date_add ( const T &  column,
IntervalExpr  interval_expr 
)

Definition at line 468 of file date.hpp.

◆ date_add() [2/2]

template<SqlExpr DateExpr>
auto relx::query::date_add ( DateExpr  date_expr,
IntervalExpr  interval_expr 
)

DATE_ADD function - adds an interval to a date.

Template Parameters
DateExprDate expression type
Parameters
date_exprDate expression
interval_exprInterval expression (created with interval())
Returns
A DateArithmeticExpr representing date + interval

Definition at line 460 of file date.hpp.

◆ date_diff() [1/4]

template<typename T , SqlExpr Expr>
requires date_checking::DateTimeColumn<T>
auto relx::query::date_diff ( std::string_view  unit,
const T &  column,
Expr  expr 
)

Definition at line 443 of file date.hpp.

◆ date_diff() [2/4]

template<typename T1 , typename T2 >
requires date_checking::DateTimeColumn<T1> && date_checking::DateTimeColumn<T2>
auto relx::query::date_diff ( std::string_view  unit,
const T1 &  col1,
const T2 &  col2 
)

Definition at line 436 of file date.hpp.

◆ date_diff() [3/4]

template<SqlExpr Expr, typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::date_diff ( std::string_view  unit,
Expr  expr,
const T &  column 
)

Definition at line 450 of file date.hpp.

◆ date_diff() [4/4]

template<SqlExpr Expr1, SqlExpr Expr2>
auto relx::query::date_diff ( std::string_view  unit,
Expr1  date1,
Expr2  date2 
)

DATE_DIFF function - calculates difference between two dates.

Template Parameters
Expr1First date expression type
Expr2Second date expression type
Parameters
unitTime unit for the difference (e.g., "days", "months", "years")
date1First date expression
date2Second date expression
Returns
A BinaryDateFunctionExpr representing DATE_DIFF(unit, date1, date2)

Definition at line 428 of file date.hpp.

◆ date_sub() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::date_sub ( const T &  column,
IntervalExpr  interval_expr 
)

Definition at line 486 of file date.hpp.

◆ date_sub() [2/2]

template<SqlExpr DateExpr>
auto relx::query::date_sub ( DateExpr  date_expr,
IntervalExpr  interval_expr 
)

DATE_SUB function - subtracts an interval from a date.

Template Parameters
DateExprDate expression type
Parameters
date_exprDate expression
interval_exprInterval expression (created with interval())
Returns
A DateArithmeticExpr representing date - interval

Definition at line 478 of file date.hpp.

◆ date_trunc() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::date_trunc ( std::string_view  unit,
const T &  column 
)

Definition at line 521 of file date.hpp.

◆ date_trunc() [2/2]

template<SqlExpr Expr>
auto relx::query::date_trunc ( std::string_view  unit,
Expr  expr 
)

DATE_TRUNC function - truncates a date to specified precision.

Template Parameters
ExprDate expression type
Parameters
unitPrecision to truncate to (e.g., "year", "month", "day", "hour", "minute")
exprDate expression
Returns
A UnaryDateFunctionExpr representing DATE_TRUNC(unit, expr)

Definition at line 514 of file date.hpp.

◆ day() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::day ( const T &  date_column)

Get the day from a date.

Template Parameters
TDate column or expression type
Parameters
date_columnDate column
Returns
Extract expression for day

Definition at line 692 of file date.hpp.

◆ day() [2/2]

template<SqlExpr Expr>
auto relx::query::day ( Expr  expr)

Definition at line 698 of file date.hpp.

◆ day_of_week() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::day_of_week ( const T &  date_column)

Get the day of week from a date (0=Sunday, 1=Monday, etc.)

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Extract expression for day of week

Definition at line 708 of file date.hpp.

◆ day_of_week() [2/2]

template<SqlExpr Expr>
auto relx::query::day_of_week ( Expr  expr)

Definition at line 714 of file date.hpp.

◆ day_of_year() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::day_of_year ( const T &  date_column)

Get the day of year from a date (1-366)

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Extract expression for day of year

Definition at line 724 of file date.hpp.

◆ day_of_year() [2/2]

template<SqlExpr Expr>
auto relx::query::day_of_year ( Expr  expr)

Definition at line 730 of file date.hpp.

◆ days_since() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::days_since ( const T &  date_column)

Calculate days since a date.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Date difference expression in days

Definition at line 580 of file date.hpp.

◆ days_since() [2/2]

template<SqlExpr Expr>
auto relx::query::days_since ( Expr  expr)

Definition at line 586 of file date.hpp.

◆ days_until() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::days_until ( const T &  date_column)

Calculate days until a date.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Date difference expression in days

Definition at line 596 of file date.hpp.

◆ days_until() [2/2]

template<SqlExpr Expr>
auto relx::query::days_until ( Expr  expr)

Definition at line 602 of file date.hpp.

◆ delete_from()

template<TableType Table>
auto relx::query::delete_from ( const Table &  table)

Create a DELETE query for the specified table.

Template Parameters
TableThe table type
Parameters
tableThe table to delete from
Returns
A DeleteQuery object

Definition at line 99 of file delete.hpp.

◆ desc() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::desc ( const T &  column)

Definition at line 560 of file select.hpp.

◆ desc() [2/2]

template<SqlExpr Expr>
auto relx::query::desc ( Expr  expr)

Create a descending order by expression.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to order by
Returns
A DescendingExpr object

Definition at line 554 of file select.hpp.

◆ distinct() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::distinct ( const T &  column)

Definition at line 266 of file function.hpp.

◆ distinct() [2/2]

template<SqlExpr Expr>
auto relx::query::distinct ( Expr  expr)

Create a DISTINCT expression.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to apply DISTINCT to
Returns
A DistinctExpr

Definition at line 259 of file function.hpp.

◆ else_() [1/9]

auto relx::query::else_ ( CaseBuilder builder,
bool  value 
)
inline

Definition at line 97 of file case_helpers.hpp.

◆ else_() [2/9]

auto relx::query::else_ ( CaseBuilder builder,
const char *  value 
)
inline

Definition at line 55 of file case_helpers.hpp.

◆ else_() [3/9]

auto relx::query::else_ ( CaseBuilder builder,
const std::string &  value 
)
inline

Definition at line 61 of file case_helpers.hpp.

◆ else_() [4/9]

auto relx::query::else_ ( CaseBuilder builder,
double  value 
)
inline

Definition at line 85 of file case_helpers.hpp.

◆ else_() [5/9]

auto relx::query::else_ ( CaseBuilder builder,
float  value 
)
inline

Definition at line 91 of file case_helpers.hpp.

◆ else_() [6/9]

auto relx::query::else_ ( CaseBuilder builder,
int  value 
)
inline

Definition at line 67 of file case_helpers.hpp.

◆ else_() [7/9]

auto relx::query::else_ ( CaseBuilder builder,
long long  value 
)
inline

Definition at line 79 of file case_helpers.hpp.

◆ else_() [8/9]

auto relx::query::else_ ( CaseBuilder builder,
long  value 
)
inline

Definition at line 73 of file case_helpers.hpp.

◆ else_() [9/9]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::else_ ( const schema::column< TableT, Name, T, Modifiers... > &  result)

Definition at line 646 of file operators.hpp.

◆ extract() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::extract ( std::string_view  unit,
const T &  column 
)

Definition at line 504 of file date.hpp.

◆ extract() [2/2]

template<SqlExpr Expr>
auto relx::query::extract ( std::string_view  unit,
Expr  expr 
)

EXTRACT function - extracts a date part from a date.

Template Parameters
ExprDate expression type
Parameters
unitDate part to extract (e.g., "year", "month", "day", "hour", "minute", "second", "dow")
exprDate expression
Returns
A UnaryDateFunctionExpr representing EXTRACT(unit FROM expr)

Definition at line 497 of file date.hpp.

◆ from()

template<typename Columns , TableType Table>
auto relx::query::from ( const SelectQuery< Columns > &  query,
const Table &  table 
)

FROM extension for schema tables with automatic adapter creation.

Template Parameters
ColumnsThe tuple of column expressions
TableThe schema table type
Parameters
queryThe select query
tableThe schema table
Returns
A new SelectQuery with the table added to the FROM clause

Definition at line 24 of file helpers.hpp.

◆ hour() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::hour ( const T &  date_column)

Get the hour from a timestamp.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Extract expression for hour

Definition at line 740 of file date.hpp.

◆ hour() [2/2]

template<SqlExpr Expr>
auto relx::query::hour ( Expr  expr)

Definition at line 746 of file date.hpp.

◆ in() [1/2]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, std::ranges::range Range>
requires std::convertible_to<std::ranges::range_value_t<Range>, std::string>
auto relx::query::in ( const schema::column< TableT, Name, T, Modifiers... > &  col,
Range  values 
)

Create an IN condition with type checking for columns.

Template Parameters
ColumnThe column type
RangeThe values range type
Parameters
colThe column
valuesThe values to check against
Returns
An InCondition expression

Definition at line 132 of file condition.hpp.

◆ in() [2/2]

template<SqlExpr Expr, std::ranges::range Range>
requires std::convertible_to<std::ranges::range_value_t<Range>, std::string>
auto relx::query::in ( Expr  expr,
Range  values 
)

Create an IN condition for expressions.

Template Parameters
ExprThe expression type
RangeThe values range type
Parameters
exprThe column or expression
valuesThe values to check against
Returns
An InCondition expression

Definition at line 191 of file condition.hpp.

◆ insert_into()

template<TableType Table>
auto relx::query::insert_into ( const Table &  table)

Create an INSERT query for the specified table.

Template Parameters
TableThe table type
Parameters
tableThe table to insert into
Returns
An InsertQuery object

Definition at line 330 of file insert.hpp.

◆ interval()

auto relx::query::interval ( std::string_view  interval_str)
inline

Create an interval expression.

Parameters
interval_strInterval string (e.g., "1 day", "3 months", "2 years")
Returns
An IntervalExpr representing the interval

Definition at line 528 of file date.hpp.

◆ is_empty_tuple()

template<typename Tuple >
static constexpr bool relx::query::is_empty_tuple ( )
staticconstexpr

Helper to check if a tuple is empty.

Definition at line 14 of file meta.hpp.

◆ is_not_null() [1/2]

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

Definition at line 611 of file operators.hpp.

◆ is_not_null() [2/2]

template<SqlExpr Expr>
auto relx::query::is_not_null ( Expr  expr)

Create an IS NOT NULL condition.

Template Parameters
ExprThe expression type
Parameters
exprThe column or expression
Returns
An IsNotNullCondition expression

Definition at line 300 of file condition.hpp.

◆ is_null() [1/2]

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

Definition at line 604 of file operators.hpp.

◆ is_null() [2/2]

template<SqlExpr Expr>
auto relx::query::is_null ( Expr  expr)

Create an IS NULL condition.

Template Parameters
ExprThe expression type
Parameters
exprThe column or expression
Returns
An IsNullCondition expression

Definition at line 277 of file condition.hpp.

◆ join()

template<typename Columns , typename Tables , typename Joins , typename Where , typename GroupBys , typename OrderBys , typename HavingCond , typename LimitVal , typename OffsetVal , TableType Table, ConditionExpr Condition>
auto relx::query::join ( const SelectQuery< Columns, Tables, Joins, Where, GroupBys, OrderBys, HavingCond, LimitVal, OffsetVal > &  query,
const Table &  table,
Condition  cond,
JoinType  type = JoinType::Inner 
)

JOIN extension for schema tables with automatic adapter creation.

Template Parameters
ColumnsThe tuple of column expressions
TablesThe tuple of table adapters
JoinsThe tuple of join specifications
WhereThe where condition type
GroupBysThe tuple of group by expressions
OrderBysThe tuple of order by expressions
HavingCondThe having condition type
LimitValThe limit value type
OffsetValThe offset value type
TableThe schema table type
ConditionThe join condition type
Parameters
queryThe select query
tableThe schema table to join
condThe join condition
typeThe join type
Returns
A new SelectQuery with the join added

Definition at line 49 of file helpers.hpp.

◆ join_type_to_string()

std::string relx::query::join_type_to_string ( JoinType  type)
inline

Convert a JoinType to its SQL string representation.

Definition at line 71 of file core.hpp.

◆ length() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::length ( const T &  column)

Definition at line 326 of file function.hpp.

◆ length() [2/2]

template<SqlExpr Expr>
auto relx::query::length ( Expr  expr)

LENGTH string function.

Template Parameters
ExprThe expression type
Parameters
exprThe string expression to get length of
Returns
A FunctionExpr representing LENGTH(expr)

Definition at line 319 of file function.hpp.

◆ like() [1/2]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::like ( const schema::column< TableT, Name, T, Modifiers... > &  col,
std::string  pattern 
)

Definition at line 597 of file operators.hpp.

◆ like() [2/2]

template<SqlExpr Expr>
auto relx::query::like ( Expr  expr,
std::string  pattern 
)

Create a LIKE condition.

Template Parameters
ExprThe expression type
Parameters
exprThe column or expression
patternThe LIKE pattern
Returns
A LikeCondition expression

Definition at line 221 of file condition.hpp.

◆ lower() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::lower ( const T &  column)

Definition at line 282 of file function.hpp.

◆ lower() [2/2]

template<SqlExpr Expr>
auto relx::query::lower ( Expr  expr)

LOWER string function.

Template Parameters
ExprThe expression type
Parameters
exprThe string expression to convert to lowercase
Returns
A FunctionExpr representing LOWER(expr)

Definition at line 275 of file function.hpp.

◆ max() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::max ( const T &  column)

Definition at line 213 of file function.hpp.

◆ max() [2/2]

template<SqlExpr Expr>
auto relx::query::max ( Expr  expr)

MAX aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to find maximum of
Returns
A FunctionExpr representing MAX(expr)

Definition at line 206 of file function.hpp.

◆ min() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::min ( const T &  column)

Definition at line 193 of file function.hpp.

◆ min() [2/2]

template<SqlExpr Expr>
auto relx::query::min ( Expr  expr)

MIN aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to find minimum of
Returns
A FunctionExpr representing MIN(expr)

Definition at line 186 of file function.hpp.

◆ minute() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::minute ( const T &  date_column)

Get the minute from a timestamp.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Extract expression for minute

Definition at line 756 of file date.hpp.

◆ minute() [2/2]

template<SqlExpr Expr>
auto relx::query::minute ( Expr  expr)

Definition at line 762 of file date.hpp.

◆ month() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::month ( const T &  date_column)

Get the month from a date.

Template Parameters
TDate column or expression type
Parameters
date_columnDate column
Returns
Extract expression for month

Definition at line 676 of file date.hpp.

◆ month() [2/2]

template<SqlExpr Expr>
auto relx::query::month ( Expr  expr)

Definition at line 682 of file date.hpp.

◆ now()

auto relx::query::now ( )
inline

NOW function - alias for CURRENT_TIMESTAMP.

Returns
A CurrentDateTimeExpr representing NOW()

Definition at line 552 of file date.hpp.

◆ on()

template<ConditionExpr Condition>
auto relx::query::on ( Condition  cond)

Create a join condition with the ON clause.

Template Parameters
ConditionThe condition type
Parameters
condThe join condition
Returns
The condition expression

Definition at line 43 of file select.hpp.

◆ operator!()

template<SqlExpr Expr>
auto relx::query::operator! ( Expr  expr)

Logical NOT operator.

Definition at line 320 of file condition.hpp.

◆ operator!=() [1/28]

template<SqlExpr Expr>
auto relx::query::operator!= ( const AliasedColumn< Expr > &  col,
const char *  str 
)

Definition at line 832 of file operators.hpp.

◆ operator!=() [2/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 817 of file operators.hpp.

◆ operator!=() [3/28]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator!= ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1352 of file operators.hpp.

◆ operator!=() [4/28]

template<SqlExpr Expr>
auto relx::query::operator!= ( const char *  str,
const AliasedColumn< Expr > &  col 
)

Definition at line 838 of file operators.hpp.

◆ operator!=() [5/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto relx::query::operator!= ( const char *  str,
const CoalesceExpr< First, Second, Rest... > &  coalesce 
)

Definition at line 1086 of file operators.hpp.

◆ operator!=() [6/28]

template<SqlExpr Expr>
auto relx::query::operator!= ( const char *  str,
const FunctionExpr< Expr > &  func 
)

Definition at line 960 of file operators.hpp.

◆ operator!=() [7/28]

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

Definition at line 589 of file operators.hpp.

◆ operator!=() [8/28]

template<typename Column >
auto relx::query::operator!= ( const char *  str,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 776 of file operators.hpp.

◆ operator!=() [9/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto relx::query::operator!= ( const CoalesceExpr< First, Second, Rest... > &  coalesce,
const char *  str 
)

Definition at line 1079 of file operators.hpp.

◆ operator!=() [10/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( const CoalesceExpr< First, Second, Rest... > &  coalesce,
LiteralT &&  literal 
)

Definition at line 1063 of file operators.hpp.

◆ operator!=() [11/28]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1109 of file operators.hpp.

◆ operator!=() [12/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator!= ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1237 of file operators.hpp.

◆ operator!=() [13/28]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator!= ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1413 of file operators.hpp.

◆ operator!=() [14/28]

template<SqlExpr Expr>
auto relx::query::operator!= ( const FunctionExpr< Expr > &  func,
const char *  str 
)

Definition at line 954 of file operators.hpp.

◆ operator!=() [15/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 939 of file operators.hpp.

◆ operator!=() [16/28]

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

Definition at line 576 of file operators.hpp.

◆ operator!=() [17/28]

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

Definition at line 384 of file operators.hpp.

◆ operator!=() [18/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator!= ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 447 of file operators.hpp.

◆ operator!=() [19/28]

template<typename Column >
auto relx::query::operator!= ( const SchemaColumnAdapter< Column > &  col,
const char *  str 
)

Definition at line 766 of file operators.hpp.

◆ operator!=() [20/28]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator!= ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 674 of file operators.hpp.

◆ operator!=() [21/28]

template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator!= ( const UnaryDateFunctionExpr< Expr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1292 of file operators.hpp.

◆ operator!=() [22/28]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator!= ( Left  left,
Right  right 
)

Inequality condition (col != value)

Definition at line 48 of file condition.hpp.

◆ operator!=() [23/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 826 of file operators.hpp.

◆ operator!=() [24/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( LiteralT &&  literal,
const CoalesceExpr< First, Second, Rest... > &  coalesce 
)

Definition at line 1073 of file operators.hpp.

◆ operator!=() [25/28]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1117 of file operators.hpp.

◆ operator!=() [26/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator!= ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 948 of file operators.hpp.

◆ operator!=() [27/28]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator!= ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 519 of file operators.hpp.

◆ operator!=() [28/28]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator!= ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 723 of file operators.hpp.

◆ operator&&()

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator&& ( Left  left,
Right  right 
)

Logical AND condition.

Definition at line 78 of file condition.hpp.

◆ operator*() [1/7]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator* ( const ArithmeticExpr< Left, Right > &  left_expr,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Multiplication operator for ArithmeticExpr with column.

Definition at line 417 of file arithmetic.hpp.

◆ operator*() [2/7]

template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator* ( const ArithmeticExpr< Left, Right > &  left_expr,
ValueT &&  value 
)

Multiplication operator for ArithmeticExpr with value.

Definition at line 445 of file arithmetic.hpp.

◆ operator*() [3/7]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto relx::query::operator* ( const schema::column< TableT, Name, T, Modifiers... > &  left,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Multiplication operator for column with ArithmeticExpr.

Definition at line 431 of file arithmetic.hpp.

◆ operator*() [4/7]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator* ( const schema::column< TableT, Name, T, Modifiers... > &  left,
ValueT &&  value 
)

Multiplication operator for column with value.

Definition at line 237 of file arithmetic.hpp.

◆ operator*() [5/7]

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

Multiplication operator for columns.

Definition at line 217 of file arithmetic.hpp.

◆ operator*() [6/7]

template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator* ( ValueT &&  value,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Multiplication operator for value with ArithmeticExpr.

Definition at line 457 of file arithmetic.hpp.

◆ operator*() [7/7]

template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator* ( ValueT &&  value,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Multiplication operator for value with column (reversed)

Definition at line 255 of file arithmetic.hpp.

◆ operator+() [1/11]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator+ ( const ArithmeticExpr< Left, Right > &  left_expr,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Addition operator for ArithmeticExpr with column.

Definition at line 318 of file arithmetic.hpp.

◆ operator+() [2/11]

template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator+ ( const ArithmeticExpr< Left, Right > &  left_expr,
ValueT &&  value 
)

Addition operator for ArithmeticExpr with value.

Definition at line 346 of file arithmetic.hpp.

◆ operator+() [3/11]

template<SqlExpr DateExpr, SqlExpr IntervalExpr1>
auto relx::query::operator+ ( const DateArithmeticExpr< DateExpr, IntervalExpr1 > &  date_expr,
const IntervalExpr interval_expr 
)

Addition operator for DateArithmeticExpr + interval (chaining)

Definition at line 814 of file date.hpp.

◆ operator+() [4/11]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto relx::query::operator+ ( const schema::column< TableT, Name, T, Modifiers... > &  left,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Addition operator for column with ArithmeticExpr.

Definition at line 332 of file arithmetic.hpp.

◆ operator+() [5/11]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator+ ( const schema::column< TableT, Name, T, Modifiers... > &  left,
ValueT &&  value 
)

Addition operator for column with value.

Definition at line 138 of file arithmetic.hpp.

◆ operator+() [6/11]

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

Addition operator for columns with type checking.

Definition at line 117 of file arithmetic.hpp.

◆ operator+() [7/11]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::operator+ ( const T &  date_column,
const IntervalExpr interval_expr 
)

Addition operator for date column + interval.

Definition at line 787 of file date.hpp.

◆ operator+() [8/11]

template<SqlExpr Expr1, SqlExpr Expr2>
auto relx::query::operator+ ( const UnaryDateFunctionExpr< Expr1 > &  left,
const UnaryDateFunctionExpr< Expr2 > &  right 
)

Addition operator for two UnaryDateFunctionExpr.

Definition at line 849 of file date.hpp.

◆ operator+() [9/11]

template<SqlExpr DateExpr>
auto relx::query::operator+ ( DateExpr  date_expr,
const IntervalExpr interval_expr 
)

Addition operator for date expression + interval.

Definition at line 794 of file date.hpp.

◆ operator+() [10/11]

template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator+ ( ValueT &&  value,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Addition operator for value with ArithmeticExpr.

Definition at line 358 of file arithmetic.hpp.

◆ operator+() [11/11]

template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator+ ( ValueT &&  value,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Addition operator for value with column (reversed)

Definition at line 156 of file arithmetic.hpp.

◆ operator-() [1/11]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator- ( const ArithmeticExpr< Left, Right > &  left_expr,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Subtraction operator for ArithmeticExpr with column.

Definition at line 365 of file arithmetic.hpp.

◆ operator-() [2/11]

template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator- ( const ArithmeticExpr< Left, Right > &  left_expr,
ValueT &&  value 
)

Subtraction operator for ArithmeticExpr with value.

Definition at line 393 of file arithmetic.hpp.

◆ operator-() [3/11]

template<SqlExpr DateExpr, SqlExpr IntervalExpr1>
auto relx::query::operator- ( const DateArithmeticExpr< DateExpr, IntervalExpr1 > &  date_expr,
const IntervalExpr interval_expr 
)

Subtraction operator for DateArithmeticExpr - interval (chaining)

Definition at line 822 of file date.hpp.

◆ operator-() [4/11]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto relx::query::operator- ( const schema::column< TableT, Name, T, Modifiers... > &  left,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Subtraction operator for column with ArithmeticExpr.

Definition at line 379 of file arithmetic.hpp.

◆ operator-() [5/11]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator- ( const schema::column< TableT, Name, T, Modifiers... > &  left,
ValueT &&  value 
)

Subtraction operator for column with value.

Definition at line 183 of file arithmetic.hpp.

◆ operator-() [6/11]

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

Subtraction operator for columns.

Definition at line 163 of file arithmetic.hpp.

◆ operator-() [7/11]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::operator- ( const T &  date_column,
const IntervalExpr interval_expr 
)

Subtraction operator for date column - interval.

Definition at line 801 of file date.hpp.

◆ operator-() [8/11]

template<SqlExpr Expr1, SqlExpr Expr2>
auto relx::query::operator- ( const UnaryDateFunctionExpr< Expr1 > &  left,
const UnaryDateFunctionExpr< Expr2 > &  right 
)

Subtraction operator for two UnaryDateFunctionExpr.

Definition at line 841 of file date.hpp.

◆ operator-() [9/11]

template<SqlExpr DateExpr>
auto relx::query::operator- ( DateExpr  date_expr,
const IntervalExpr interval_expr 
)

Subtraction operator for date expression - interval.

Definition at line 808 of file date.hpp.

◆ operator-() [10/11]

template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator- ( ValueT &&  value,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Subtraction operator for value with ArithmeticExpr.

Definition at line 405 of file arithmetic.hpp.

◆ operator-() [11/11]

template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator- ( ValueT &&  value,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Subtraction operator for value with column (reversed)

Definition at line 201 of file arithmetic.hpp.

◆ operator/() [1/7]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator/ ( const ArithmeticExpr< Left, Right > &  left_expr,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Division operator for ArithmeticExpr with column.

Definition at line 464 of file arithmetic.hpp.

◆ operator/() [2/7]

template<SqlExpr Left, SqlExpr Right, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator/ ( const ArithmeticExpr< Left, Right > &  left_expr,
ValueT &&  value 
)

Division operator for ArithmeticExpr with value.

Definition at line 492 of file arithmetic.hpp.

◆ operator/() [3/7]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, SqlExpr Left, SqlExpr Right>
auto relx::query::operator/ ( const schema::column< TableT, Name, T, Modifiers... > &  left,
const ArithmeticExpr< Left, Right > &  right_expr 
)

Division operator for column with ArithmeticExpr.

Definition at line 478 of file arithmetic.hpp.

◆ operator/() [4/7]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ValueT >
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator/ ( const schema::column< TableT, Name, T, Modifiers... > &  left,
ValueT &&  value 
)

Division operator for column with value.

Definition at line 282 of file arithmetic.hpp.

◆ operator/() [5/7]

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

Division operator for columns.

Definition at line 262 of file arithmetic.hpp.

◆ operator/() [6/7]

template<typename ValueT , SqlExpr Left, SqlExpr Right>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator/ ( ValueT &&  value,
const query::ArithmeticExpr< Left, Right > &  right_expr 
)

Division operator for value with ArithmeticExpr.

Definition at line 504 of file arithmetic.hpp.

◆ operator/() [7/7]

template<typename ValueT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<ValueT>>
auto relx::query::operator/ ( ValueT &&  value,
const schema::column< TableT, Name, T, Modifiers... > &  right 
)

Division operator for value with column (reversed)

Definition at line 300 of file arithmetic.hpp.

◆ operator<() [1/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 854 of file operators.hpp.

◆ operator<() [2/16]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator< ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1312 of file operators.hpp.

◆ operator<() [3/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1140 of file operators.hpp.

◆ operator<() [4/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator< ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1205 of file operators.hpp.

◆ operator<() [5/16]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator< ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1373 of file operators.hpp.

◆ operator<() [6/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 976 of file operators.hpp.

◆ operator<() [7/16]

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

Definition at line 402 of file operators.hpp.

◆ operator<() [8/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator< ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 471 of file operators.hpp.

◆ operator<() [9/16]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator< ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 690 of file operators.hpp.

◆ operator<() [10/16]

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

Definition at line 1256 of file operators.hpp.

◆ operator<() [11/16]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator< ( Left  left,
Right  right 
)

Less than condition (col < value)

Definition at line 60 of file condition.hpp.

◆ operator<() [12/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 886 of file operators.hpp.

◆ operator<() [13/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1148 of file operators.hpp.

◆ operator<() [14/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator< ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 1008 of file operators.hpp.

◆ operator<() [15/16]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator< ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 539 of file operators.hpp.

◆ operator<() [16/16]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator< ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 739 of file operators.hpp.

◆ operator<=() [1/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 870 of file operators.hpp.

◆ operator<=() [2/16]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator<= ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1332 of file operators.hpp.

◆ operator<=() [3/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1172 of file operators.hpp.

◆ operator<=() [4/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator<= ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1221 of file operators.hpp.

◆ operator<=() [5/16]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator<= ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1393 of file operators.hpp.

◆ operator<=() [6/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 992 of file operators.hpp.

◆ operator<=() [7/16]

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

Definition at line 420 of file operators.hpp.

◆ operator<=() [8/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator<= ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 495 of file operators.hpp.

◆ operator<=() [9/16]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator<= ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 706 of file operators.hpp.

◆ operator<=() [10/16]

template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator<= ( const UnaryDateFunctionExpr< Expr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1274 of file operators.hpp.

◆ operator<=() [11/16]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator<= ( Left  left,
Right  right 
)

Less than or equal condition (col <= value)

Definition at line 72 of file condition.hpp.

◆ operator<=() [12/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 900 of file operators.hpp.

◆ operator<=() [13/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1180 of file operators.hpp.

◆ operator<=() [14/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator<= ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 1022 of file operators.hpp.

◆ operator<=() [15/16]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator<= ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 559 of file operators.hpp.

◆ operator<=() [16/16]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator<= ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 755 of file operators.hpp.

◆ operator==() [1/28]

template<SqlExpr Expr>
auto relx::query::operator== ( const AliasedColumn< Expr > &  col,
const char *  str 
)

Definition at line 803 of file operators.hpp.

◆ operator==() [2/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 788 of file operators.hpp.

◆ operator==() [3/28]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator== ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1342 of file operators.hpp.

◆ operator==() [4/28]

template<SqlExpr Expr>
auto relx::query::operator== ( const char *  str,
const AliasedColumn< Expr > &  col 
)

Definition at line 809 of file operators.hpp.

◆ operator==() [5/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto relx::query::operator== ( const char *  str,
const CoalesceExpr< First, Second, Rest... > &  coalesce 
)

Definition at line 1055 of file operators.hpp.

◆ operator==() [6/28]

template<SqlExpr Expr>
auto relx::query::operator== ( const char *  str,
const FunctionExpr< Expr > &  func 
)

Definition at line 931 of file operators.hpp.

◆ operator==() [7/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator== ( const char *  str,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 584 of file operators.hpp.

◆ operator==() [8/28]

template<typename Column >
auto relx::query::operator== ( const char *  str,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 771 of file operators.hpp.

◆ operator==() [9/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest>
auto relx::query::operator== ( const CoalesceExpr< First, Second, Rest... > &  coalesce,
const char *  str 
)

Definition at line 1048 of file operators.hpp.

◆ operator==() [10/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( const CoalesceExpr< First, Second, Rest... > &  coalesce,
LiteralT &&  literal 
)

Definition at line 1032 of file operators.hpp.

◆ operator==() [11/28]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1094 of file operators.hpp.

◆ operator==() [12/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator== ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1229 of file operators.hpp.

◆ operator==() [13/28]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator== ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1403 of file operators.hpp.

◆ operator==() [14/28]

template<SqlExpr Expr>
auto relx::query::operator== ( const FunctionExpr< Expr > &  func,
const char *  str 
)

Definition at line 925 of file operators.hpp.

◆ operator==() [15/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 910 of file operators.hpp.

◆ operator==() [16/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::operator== ( const schema::column< TableT, Name, T, Modifiers... > &  col,
const char *  str 
)

Definition at line 568 of file operators.hpp.

◆ operator==() [17/28]

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

Definition at line 375 of file operators.hpp.

◆ operator==() [18/28]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator== ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 435 of file operators.hpp.

◆ operator==() [19/28]

template<typename Column >
auto relx::query::operator== ( const SchemaColumnAdapter< Column > &  col,
const char *  str 
)

Definition at line 761 of file operators.hpp.

◆ operator==() [20/28]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator== ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 666 of file operators.hpp.

◆ operator==() [21/28]

template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator== ( const UnaryDateFunctionExpr< Expr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1283 of file operators.hpp.

◆ operator==() [22/28]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator== ( Left  left,
Right  right 
)

Equality condition (col = value)

Definition at line 42 of file condition.hpp.

◆ operator==() [23/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 797 of file operators.hpp.

◆ operator==() [24/28]

template<SqlExpr First, SqlExpr Second, SqlExpr... Rest, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( LiteralT &&  literal,
const CoalesceExpr< First, Second, Rest... > &  coalesce 
)

Definition at line 1042 of file operators.hpp.

◆ operator==() [25/28]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1102 of file operators.hpp.

◆ operator==() [26/28]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator== ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 919 of file operators.hpp.

◆ operator==() [27/28]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator== ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 509 of file operators.hpp.

◆ operator==() [28/28]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator== ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 715 of file operators.hpp.

◆ operator>() [1/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 846 of file operators.hpp.

◆ operator>() [2/16]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator> ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1302 of file operators.hpp.

◆ operator>() [3/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1124 of file operators.hpp.

◆ operator>() [4/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator> ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1197 of file operators.hpp.

◆ operator>() [5/16]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator> ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1363 of file operators.hpp.

◆ operator>() [6/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 968 of file operators.hpp.

◆ operator>() [7/16]

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

Definition at line 393 of file operators.hpp.

◆ operator>() [8/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator> ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 459 of file operators.hpp.

◆ operator>() [9/16]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator> ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 682 of file operators.hpp.

◆ operator>() [10/16]

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

Definition at line 1247 of file operators.hpp.

◆ operator>() [11/16]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator> ( Left  left,
Right  right 
)

Greater than condition (col > value)

Definition at line 54 of file condition.hpp.

◆ operator>() [12/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 879 of file operators.hpp.

◆ operator>() [13/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1132 of file operators.hpp.

◆ operator>() [14/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator> ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 1001 of file operators.hpp.

◆ operator>() [15/16]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator> ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 529 of file operators.hpp.

◆ operator>() [16/16]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator> ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 731 of file operators.hpp.

◆ operator>=() [1/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( const AliasedColumn< Expr > &  col,
LiteralT &&  literal 
)

Definition at line 862 of file operators.hpp.

◆ operator>=() [2/16]

template<SqlExpr Left, SqlExpr Right, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator>= ( const BinaryDateFunctionExpr< Left, Right > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1322 of file operators.hpp.

◆ operator>=() [3/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( const CountAllExpr expr,
LiteralT &&  literal 
)

Definition at line 1156 of file operators.hpp.

◆ operator>=() [4/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator>= ( const CurrentDateTimeExpr expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1213 of file operators.hpp.

◆ operator>=() [5/16]

template<SqlExpr DateExpr, SqlExpr IntervalExpr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator>= ( const DateArithmeticExpr< DateExpr, IntervalExpr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1383 of file operators.hpp.

◆ operator>=() [6/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( const FunctionExpr< Expr > &  func,
LiteralT &&  literal 
)

Definition at line 984 of file operators.hpp.

◆ operator>=() [7/16]

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

Definition at line 411 of file operators.hpp.

◆ operator>=() [8/16]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator>= ( const schema::column< TableT, Name, T, Modifiers... > &  col,
LiteralT &&  literal 
)

Definition at line 483 of file operators.hpp.

◆ operator>=() [9/16]

template<typename Column , typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator>= ( const SchemaColumnAdapter< Column > &  col,
LiteralT &&  literal 
)

Definition at line 698 of file operators.hpp.

◆ operator>=() [10/16]

template<SqlExpr Expr, typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires date_checking::DateTimeType<T>
auto relx::query::operator>= ( const UnaryDateFunctionExpr< Expr > &  expr,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 1265 of file operators.hpp.

◆ operator>=() [11/16]

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator>= ( Left  left,
Right  right 
)

Greater than or equal condition (col >= value)

Definition at line 66 of file condition.hpp.

◆ operator>=() [12/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( LiteralT &&  literal,
const AliasedColumn< Expr > &  col 
)

Definition at line 893 of file operators.hpp.

◆ operator>=() [13/16]

template<typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( LiteralT &&  literal,
const CountAllExpr expr 
)

Definition at line 1164 of file operators.hpp.

◆ operator>=() [14/16]

template<SqlExpr Expr, typename LiteralT >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> || std::is_convertible_v<std::remove_cvref_t<LiteralT>, std::string>
auto relx::query::operator>= ( LiteralT &&  literal,
const FunctionExpr< Expr > &  func 
)

Definition at line 1015 of file operators.hpp.

◆ operator>=() [15/16]

template<typename LiteralT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator>= ( LiteralT &&  literal,
const schema::column< TableT, Name, T, Modifiers... > &  col 
)

Definition at line 549 of file operators.hpp.

◆ operator>=() [16/16]

template<typename LiteralT , typename Column >
requires std::is_arithmetic_v<std::remove_cvref_t<LiteralT>> && (!std::is_same_v<LiteralT, bool>) && (!meta::is_specialization_v<std::remove_cvref_t<LiteralT>, Value>)
auto relx::query::operator>= ( LiteralT &&  literal,
const SchemaColumnAdapter< Column > &  col 
)

Definition at line 747 of file operators.hpp.

◆ operator||()

template<SqlExpr Left, SqlExpr Right>
auto relx::query::operator|| ( Left  left,
Right  right 
)

Logical OR condition.

Definition at line 84 of file condition.hpp.

◆ second() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::second ( const T &  date_column)

Get the second from a timestamp.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Extract expression for second

Definition at line 772 of file date.hpp.

◆ second() [2/2]

template<SqlExpr Expr>
auto relx::query::second ( Expr  expr)

Definition at line 778 of file date.hpp.

◆ select()

template<typename... Args>
auto relx::query::select ( const Args &...  args)

Create a column reference from a member pointer without requiring a table instance.

Template Parameters
MemberPtrPointer to a column member in a table class

Create a SELECT query with the specified columns or expressions

Template Parameters
ArgsThe column or expression types
Parameters
argsThe columns or expressions to select
Returns
A SelectQuery object

Definition at line 501 of file select.hpp.

◆ select_all() [1/2]

template<TableType Table>
auto relx::query::select_all ( )

Create a SELECT * query without requiring a table instance.

Template Parameters
TableThe table type to select all columns from
Returns
A SelectQuery object with all columns from the table

Definition at line 619 of file select.hpp.

◆ select_all() [2/2]

template<TableType Table>
auto relx::query::select_all ( const Table &  table)

Definition at line 602 of file select.hpp.

◆ select_distinct()

template<typename... Args>
auto relx::query::select_distinct ( const Args &...  args)

Create a SELECT DISTINCT query with the specified columns or expressions.

Template Parameters
ArgsThe column or expression types
Parameters
argsThe columns or expressions to select
Returns
A SelectQuery object with DISTINCT enabled

Definition at line 632 of file select.hpp.

◆ select_distinct_all() [1/2]

template<TableType Table>
auto relx::query::select_distinct_all ( )

Create a SELECT DISTINCT * query without requiring a table instance.

Template Parameters
TableThe table type to select distinct all columns from
Returns
A SelectQuery object with all columns from the table and DISTINCT enabled

Definition at line 694 of file select.hpp.

◆ select_distinct_all() [2/2]

template<TableType Table>
auto relx::query::select_distinct_all ( const Table &  table)

Create a SELECT * query that uses DISTINCT.

Template Parameters
TableThe table type to select all columns from
Parameters
tableThe table to select from
Returns
A SelectQuery object with all columns from the table and DISTINCT enabled

Definition at line 674 of file select.hpp.

◆ select_distinct_expr()

template<SqlExpr... Args>
auto relx::query::select_distinct_expr ( const Args &...  args)

Create a SELECT DISTINCT query with the specified column expressions.

Template Parameters
ArgsThe column expression types
Parameters
argsThe column expressions to select
Returns
A SelectQuery object with DISTINCT enabled

Definition at line 665 of file select.hpp.

◆ select_expr() [1/2]

template<typename... Args>
auto relx::query::select_expr ( const Args &...  args)

Create a SELECT query with the specified column expressions (alias for select)

Template Parameters
ArgsThe column expression types
Parameters
argsThe column expressions to select
Returns
A SelectQuery object

Definition at line 528 of file select.hpp.

◆ select_expr() [2/2]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename... Args>
auto relx::query::select_expr ( const schema::column< TableT, Name, T, Modifiers... > &  col,
Args &&...  args 
)

Definition at line 654 of file operators.hpp.

◆ start_of_day() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::start_of_day ( const T &  date_column)

Get the start of the day for a date.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Date truncation expression to day

Definition at line 644 of file date.hpp.

◆ start_of_day() [2/2]

template<SqlExpr Expr>
auto relx::query::start_of_day ( Expr  expr)

Definition at line 650 of file date.hpp.

◆ start_of_month() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::start_of_month ( const T &  date_column)

Get the start of the month for a date.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Date truncation expression to month

Definition at line 628 of file date.hpp.

◆ start_of_month() [2/2]

template<SqlExpr Expr>
auto relx::query::start_of_month ( Expr  expr)

Definition at line 634 of file date.hpp.

◆ start_of_year() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::start_of_year ( const T &  date_column)

Get the start of the year for a date.

Template Parameters
TDate column type
Parameters
date_columnDate column
Returns
Date truncation expression to year

Definition at line 612 of file date.hpp.

◆ start_of_year() [2/2]

template<SqlExpr Expr>
auto relx::query::start_of_year ( Expr  expr)

Definition at line 618 of file date.hpp.

◆ sum() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::sum ( const T &  column)

Definition at line 153 of file function.hpp.

◆ sum() [2/2]

template<SqlExpr Expr>
auto relx::query::sum ( Expr  expr)

SUM aggregate function.

Template Parameters
ExprThe expression type
Parameters
exprThe expression to sum
Returns
A FunctionExpr representing SUM(expr)

Definition at line 146 of file function.hpp.

◆ to_expr()

template<ColumnType C>
auto relx::query::to_expr ( const C &  col,
std::string_view  table_name = "" 
)

Helper to wrap a schema column in a SQL expression.

Template Parameters
CThe column type
Parameters
colThe column to wrap
Returns
A SchemaColumnAdapter that implements the SqlExpr concept

Definition at line 85 of file schema_adapter.hpp.

◆ to_table()

template<TableType T>
auto relx::query::to_table ( const T &  table)

Helper to wrap a schema table in a table adapter.

Template Parameters
TThe table type
Parameters
tableThe table to wrap
Returns
A SchemaTableAdapter that implements table operations

Definition at line 94 of file schema_adapter.hpp.

◆ trim() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::trim ( const T &  column)

Definition at line 342 of file function.hpp.

◆ trim() [2/2]

template<SqlExpr Expr>
auto relx::query::trim ( Expr  expr)

TRIM string function.

Template Parameters
ExprThe expression type
Parameters
exprThe string expression to trim
Returns
A FunctionExpr representing TRIM(expr)

Definition at line 335 of file function.hpp.

◆ tuple_bind_params()

template<typename Tuple >
std::vector< std::string > relx::query::tuple_bind_params ( const Tuple &  tuple)

Helper to collect bind parameters from a tuple of expressions.

Definition at line 31 of file meta.hpp.

◆ tuple_to_sql()

template<typename Tuple >
std::string relx::query::tuple_to_sql ( const Tuple &  tuple,
const char *  separator 
)

Helper to convert a tuple of expressions to SQL.

Definition at line 20 of file meta.hpp.

◆ update()

template<TableType Table>
auto relx::query::update ( const Table &  table)

Create an UPDATE query for the specified table.

Template Parameters
TableThe table type
Parameters
tableThe table to update
Returns
An UpdateQuery object

Definition at line 252 of file update.hpp.

◆ upper() [1/2]

template<typename T >
requires ColumnType<T>
auto relx::query::upper ( const T &  column)

Definition at line 304 of file function.hpp.

◆ upper() [2/2]

template<SqlExpr Expr>
auto relx::query::upper ( Expr  expr)

UPPER string function.

Template Parameters
ExprThe expression type
Parameters
exprThe string expression to convert to uppercase
Returns
A FunctionExpr representing UPPER(expr)

Definition at line 297 of file function.hpp.

◆ val() [1/11]

auto relx::query::val ( bool  b)
inline

Helper to create a value expression from a bool.

Parameters
bThe boolean
Returns
A Value<bool> expression

Definition at line 185 of file value.hpp.

◆ val() [2/11]

auto relx::query::val ( const char *  str)
inline

Helper to create a value expression from a string literal.

Parameters
strThe string literal
Returns
A Value<std::string_view> expression

Definition at line 127 of file value.hpp.

◆ val() [3/11]

auto relx::query::val ( double  d)
inline

Helper to create a value expression from a double.

Parameters
dThe double
Returns
A Value<double> expression

Definition at line 171 of file value.hpp.

◆ val() [4/11]

auto relx::query::val ( float  f)
inline

Helper to create a value expression from a float.

Parameters
fThe float
Returns
A Value<float> expression

Definition at line 178 of file value.hpp.

◆ val() [5/11]

auto relx::query::val ( int  i)
inline

Helper to create a value expression from an int.

Parameters
iThe integer
Returns
A Value<int> expression

Definition at line 150 of file value.hpp.

◆ val() [6/11]

auto relx::query::val ( long  l)
inline

Helper to create a value expression from a long.

Parameters
lThe long integer
Returns
A Value<long> expression

Definition at line 157 of file value.hpp.

◆ val() [7/11]

auto relx::query::val ( long long  ll)
inline

Helper to create a value expression from a long long.

Parameters
llThe long long integer
Returns
A Value<long long> expression

Definition at line 164 of file value.hpp.

◆ val() [8/11]

auto relx::query::val ( std::nullopt_t  )
inline

Helper to create a value expression from a nullopt.

Returns
A Value<std::nullopt> expression

Definition at line 200 of file value.hpp.

◆ val() [9/11]

template<typename T >
auto relx::query::val ( std::optional< T >  opt)

Helper to create a value expression from an optional.

Template Parameters
TThe optional value type
Parameters
optThe optional value
Returns
A Value<std::optional<T>> expression

Definition at line 194 of file value.hpp.

◆ val() [10/11]

auto relx::query::val ( std::string  str)
inline

Helper to create a value expression from a string.

Parameters
strThe string
Returns
A Value<std::string> expression

Definition at line 134 of file value.hpp.

◆ val() [11/11]

auto relx::query::val ( std::string_view  sv)
inline

Helper to create a value expression from a string_view.

Note
Be careful with this one, if the underlying string_view goes out of scope, the value will be invalid
Parameters
svThe string_view
Returns
A Value<std::string_view> expression

Definition at line 143 of file value.hpp.

◆ value()

template<typename T >
auto relx::query::value ( val)

Create a value expression.

Template Parameters
TThe value type
Parameters
valThe value
Returns
A Value expression

Definition at line 120 of file value.hpp.

◆ when() [1/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
bool  value 
)
inline

Definition at line 47 of file case_helpers.hpp.

◆ when() [2/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
const char *  value 
)
inline

Definition at line 11 of file case_helpers.hpp.

◆ when() [3/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
const std::string &  value 
)
inline

Definition at line 16 of file case_helpers.hpp.

◆ when() [4/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
double  value 
)
inline

Definition at line 37 of file case_helpers.hpp.

◆ when() [5/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
float  value 
)
inline

Definition at line 42 of file case_helpers.hpp.

◆ when() [6/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
int  value 
)
inline

Definition at line 22 of file case_helpers.hpp.

◆ when() [7/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
long long  value 
)
inline

Definition at line 32 of file case_helpers.hpp.

◆ when() [8/10]

auto relx::query::when ( CaseBuilder builder,
const ConditionExpr auto &  condition,
long  value 
)
inline

Definition at line 27 of file case_helpers.hpp.

◆ when() [9/10]

template<typename CondT , typename TableT , schema::fixed_string Name, typename T , typename... Modifiers>
auto relx::query::when ( const CondT &  condition,
const schema::column< TableT, Name, T, Modifiers... > &  result 
)

Definition at line 638 of file operators.hpp.

◆ when() [10/10]

template<typename TableT , schema::fixed_string Name, typename T , typename... Modifiers, typename ResultT >
auto relx::query::when ( const schema::column< TableT, Name, T, Modifiers... > &  condition,
const query::Value< ResultT > &  result 
)

Definition at line 629 of file operators.hpp.

◆ year() [1/2]

template<typename T >
requires date_checking::DateTimeColumn<T>
auto relx::query::year ( const T &  date_column)

Get the year from a date.

Template Parameters
TDate column or expression type
Parameters
date_columnDate column
Returns
Extract expression for year

Definition at line 660 of file date.hpp.

◆ year() [2/2]

template<SqlExpr Expr>
auto relx::query::year ( Expr  expr)

Definition at line 666 of file date.hpp.