relx
0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
literals.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
value.hpp
"
4
5
#include <string>
6
#include <string_view>
7
9
namespace
relx::query::literals
{
10
14
inline
auto
operator
""
_sql(
unsigned
long
long
value
) {
15
return
Value<int>
(
static_cast<
int
>
(
value
));
16
}
17
21
inline
auto
operator
""
_sql(
long
double
value
) {
22
return
Value<double>
(
static_cast<
double
>
(
value
));
23
}
24
29
inline
auto
operator
""
_sql(
const
char
* str, std::size_t len) {
30
return
Value<std::string_view>
(std::string_view(str, len));
31
}
32
33
}
// namespace relx::query::literals
relx::query::Value
Represents a literal value in a SQL query.
Definition
value.hpp:15
relx::query::literals
Literals namespace for SQL value literals.
Definition
literals.hpp:9
relx::query::value
auto value(T val)
Create a value expression.
Definition
value.hpp:120
value.hpp
relx
query
literals.hpp
Generated by
1.9.8