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

Binary date function expression (e.g., DATE_DIFF) More...

#include <relx/query/date.hpp>

Inheritance diagram for relx::query::BinaryDateFunctionExpr< Left, Right >:
relx::query::ColumnExpression relx::query::SqlExpression

Public Member Functions

 BinaryDateFunctionExpr (std::string func_name, std::string unit, Left left, Right right)
 
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 Left, SqlExpr Right>
class relx::query::BinaryDateFunctionExpr< Left, Right >

Binary date function expression (e.g., DATE_DIFF)

Definition at line 23 of file date.hpp.

Constructor & Destructor Documentation

◆ BinaryDateFunctionExpr()

template<SqlExpr Left, SqlExpr Right>
relx::query::BinaryDateFunctionExpr< Left, Right >::BinaryDateFunctionExpr ( std::string  func_name,
std::string  unit,
Left  left,
Right  right 
)
inline

Definition at line 25 of file date.hpp.

Member Function Documentation

◆ bind_params()

template<SqlExpr Left, SqlExpr Right>
std::vector< std::string > relx::query::BinaryDateFunctionExpr< Left, Right >::bind_params ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 53 of file date.hpp.

◆ column_name()

template<SqlExpr Left, SqlExpr Right>
std::string relx::query::BinaryDateFunctionExpr< Left, Right >::column_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 60 of file date.hpp.

◆ operator!=()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator!= ( LiteralT &&  literal) const
inline

Definition at line 87 of file date.hpp.

◆ operator*()

template<SqlExpr Left, SqlExpr Right>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::BinaryDateFunctionExpr< Left, Right >::operator* ( NumericT &&  literal) const
inline

Definition at line 127 of file date.hpp.

◆ operator+()

template<SqlExpr Left, SqlExpr Right>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::BinaryDateFunctionExpr< Left, Right >::operator+ ( NumericT &&  literal) const
inline

Definition at line 134 of file date.hpp.

◆ operator-()

template<SqlExpr Left, SqlExpr Right>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::BinaryDateFunctionExpr< Left, Right >::operator- ( NumericT &&  literal) const
inline

Definition at line 141 of file date.hpp.

◆ operator/()

template<SqlExpr Left, SqlExpr Right>
template<typename NumericT >
requires std::is_arithmetic_v<std::remove_cvref_t<NumericT>>
auto relx::query::BinaryDateFunctionExpr< Left, Right >::operator/ ( NumericT &&  literal) const
inline

Definition at line 148 of file date.hpp.

◆ operator<()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator< ( LiteralT &&  literal) const
inline

Definition at line 103 of file date.hpp.

◆ operator<=()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator<= ( LiteralT &&  literal) const
inline

Definition at line 119 of file date.hpp.

◆ operator==()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator== ( LiteralT &&  literal) const
inline

Definition at line 79 of file date.hpp.

◆ operator>()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator> ( LiteralT &&  literal) const
inline

Definition at line 95 of file date.hpp.

◆ operator>=()

template<SqlExpr Left, SqlExpr Right>
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::BinaryDateFunctionExpr< Left, Right >::operator>= ( LiteralT &&  literal) const
inline

Definition at line 111 of file date.hpp.

◆ table_name()

template<SqlExpr Left, SqlExpr Right>
std::string relx::query::BinaryDateFunctionExpr< Left, Right >::table_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 62 of file date.hpp.

◆ to_sql()

template<SqlExpr Left, SqlExpr Right>
std::string relx::query::BinaryDateFunctionExpr< Left, Right >::to_sql ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 29 of file date.hpp.


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