relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
select.hpp File Reference
#include "column_expression.hpp"
#include "condition.hpp"
#include "core.hpp"
#include "meta.hpp"
#include "relx/schema/fixed_string.hpp"
#include "value.hpp"
#include <iostream>
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  relx::query::JoinSpec< Table, Condition >
 relx Query Module More...
 
class  relx::query::SelectQuery< Columns, Tables, Joins, Where, GroupBys, OrderBys, HavingCond, LimitVal, OffsetVal, IsDistinct >
 Base SELECT query builder. More...
 
class  relx::query::DescendingExpr< Expr >
 Helper for creating a descending order by expression. More...
 
class  relx::query::AscendingExpr< Expr >
 Helper for creating an ascending order by expression. More...
 

Namespaces

namespace  relx
 relx database connection
 
namespace  relx::query
 

Functions

template<ConditionExpr Condition>
auto relx::query::on (Condition cond)
 Create a join condition with the ON clause.
 
template<typename... Args>
auto relx::query::select (const Args &... args)
 Create a column reference from a member pointer without requiring a table instance.
 
template<typename... Args>
auto relx::query::select_expr (const Args &... args)
 Create a SELECT query with the specified column expressions (alias for select)
 
template<SqlExpr Expr>
auto relx::query::desc (Expr expr)
 Create a descending order by expression.
 
template<typename T >
requires ColumnType<T>
auto relx::query::desc (const T &column)
 
template<SqlExpr Expr>
auto relx::query::asc (Expr expr)
 Create an ascending order by expression.
 
template<typename T >
requires ColumnType<T>
auto relx::query::asc (const T &column)
 Create an ascending order by expression for a column.
 
template<TableType Table>
auto relx::query::select_all (const Table &table)
 
template<TableType Table>
auto relx::query::select_all ()
 Create a SELECT * query without requiring a table instance.
 
template<typename... Args>
auto relx::query::select_distinct (const Args &... args)
 Create a SELECT DISTINCT query with the specified columns or expressions.
 
template<SqlExpr... Args>
auto relx::query::select_distinct_expr (const Args &... args)
 Create a SELECT DISTINCT query with the specified column expressions.
 
template<TableType Table>
auto relx::query::select_distinct_all (const Table &table)
 Create a SELECT * query that uses DISTINCT.
 
template<TableType Table>
auto relx::query::select_distinct_all ()
 Create a SELECT DISTINCT * query without requiring a table instance.