relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::query::UnaryDateFunctionExpr< Expr > Class Template Reference

Unary date function expression with unit (e.g., EXTRACT) More...

#include <relx/query/date.hpp>

Inheritance diagram for relx::query::UnaryDateFunctionExpr< Expr >:
relx::query::ColumnExpression relx::query::SqlExpression

Public Member Functions

 UnaryDateFunctionExpr (std::string func_name, std::string unit, Expr expr)
 
std::string to_sql () const override
 
std::vector< std::string > bind_params () const override
 
std::string column_name () const override
 
std::string table_name () const override
 
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
 
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
 
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
 
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
 
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
 
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
 
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto operator* (NumericT &&literal) const
 
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto operator+ (NumericT &&literal) const
 
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto operator- (NumericT &&literal) const
 
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto operator/ (NumericT &&literal) const
 
- Public Member Functions inherited from relx::query::ColumnExpression
virtual ~ColumnExpression ()=default
 
virtual std::string qualified_name () const
 
- Public Member Functions inherited from relx::query::SqlExpression
virtual ~SqlExpression ()=default
 

Detailed Description

template<SqlExpr Expr>
class relx::query::UnaryDateFunctionExpr< Expr >

Unary date function expression with unit (e.g., EXTRACT)

Definition at line 162 of file date.hpp.

Constructor & Destructor Documentation

◆ UnaryDateFunctionExpr()

template<SqlExpr Expr>
relx::query::UnaryDateFunctionExpr< Expr >::UnaryDateFunctionExpr ( std::string  func_name,
std::string  unit,
Expr  expr 
)
inline

Definition at line 164 of file date.hpp.

Member Function Documentation

◆ bind_params()

template<SqlExpr Expr>
std::vector< std::string > relx::query::UnaryDateFunctionExpr< Expr >::bind_params ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 177 of file date.hpp.

◆ column_name()

template<SqlExpr Expr>
std::string relx::query::UnaryDateFunctionExpr< Expr >::column_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 179 of file date.hpp.

◆ operator!=()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator!= ( LiteralT &&  literal) const
inline

Definition at line 200 of file date.hpp.

◆ operator*()

template<SqlExpr Expr>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::UnaryDateFunctionExpr< Expr >::operator* ( NumericT &&  literal) const
inline

Definition at line 240 of file date.hpp.

◆ operator+()

template<SqlExpr Expr>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::UnaryDateFunctionExpr< Expr >::operator+ ( NumericT &&  literal) const
inline

Definition at line 247 of file date.hpp.

◆ operator-()

template<SqlExpr Expr>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::UnaryDateFunctionExpr< Expr >::operator- ( NumericT &&  literal) const
inline

Definition at line 254 of file date.hpp.

◆ operator/()

template<SqlExpr Expr>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::UnaryDateFunctionExpr< Expr >::operator/ ( NumericT &&  literal) const
inline

Definition at line 261 of file date.hpp.

◆ operator<()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator< ( LiteralT &&  literal) const
inline

Definition at line 216 of file date.hpp.

◆ operator<=()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator<= ( LiteralT &&  literal) const
inline

Definition at line 232 of file date.hpp.

◆ operator==()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator== ( LiteralT &&  literal) const
inline

Definition at line 192 of file date.hpp.

◆ operator>()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator> ( LiteralT &&  literal) const
inline

Definition at line 208 of file date.hpp.

◆ operator>=()

template<SqlExpr 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 relx::query::UnaryDateFunctionExpr< Expr >::operator>= ( LiteralT &&  literal) const
inline

Definition at line 224 of file date.hpp.

◆ table_name()

template<SqlExpr Expr>
std::string relx::query::UnaryDateFunctionExpr< Expr >::table_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 181 of file date.hpp.

◆ to_sql()

template<SqlExpr Expr>
std::string relx::query::UnaryDateFunctionExpr< Expr >::to_sql ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 167 of file date.hpp.


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