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

Type checking for arithmetic operations. More...

Classes

struct  extract_arithmetic_type
 Helper to extract column type for arithmetic checking. More...
 
struct  extract_arithmetic_type< schema::column< TableT, Name, ColumnT, Modifiers... > >
 
struct  remove_optional
 Helper to extract base type from optional. More...
 
struct  remove_optional< std::optional< T > >
 

Concepts

concept  Arithmetic
 Concept for numeric types suitable for arithmetic operations.
 

Typedefs

template<typename T >
using extract_arithmetic_type_t = typename extract_arithmetic_type< T >::type
 
template<typename T >
using remove_optional_t = typename remove_optional< T >::type
 

Variables

constexpr std::string_view arithmetic_error_message
 Error message for invalid arithmetic operations.
 

Detailed Description

Type checking for arithmetic operations.

Typedef Documentation

◆ extract_arithmetic_type_t

template<typename T >
using relx::query::arithmetic_checking::extract_arithmetic_type_t = typedef typename extract_arithmetic_type<T>::type

Definition at line 33 of file arithmetic.hpp.

◆ remove_optional_t

template<typename T >
using relx::query::arithmetic_checking::remove_optional_t = typedef typename remove_optional<T>::type

Definition at line 47 of file arithmetic.hpp.

Variable Documentation

◆ arithmetic_error_message

constexpr std::string_view relx::query::arithmetic_checking::arithmetic_error_message
inlineconstexpr
Initial value:
=
"Arithmetic operations (+, -, *, /) can only be performed on numeric columns (int, long, "
"float, double, etc.). "
"String, boolean, and other non-numeric types cannot be used in arithmetic expressions."

Error message for invalid arithmetic operations.

Definition at line 50 of file arithmetic.hpp.