⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
null.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/storages/postgres/null.hpp
4
/// @brief NULL type
5
6
#
include
<
userver
/
storages
/
postgres
/
io
/
nullable_traits
.
hpp
>
7
#
include
<
userver
/
storages
/
postgres
/
io
/
traits
.
hpp
>
8
#
include
<
userver
/
storages
/
postgres
/
io
/
type_mapping
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
storages
::
postgres
{
13
14
/// @brief Type to represent a null value
15
template
<
typename
T>
16
struct
Null
{};
17
18
/// @brief Template variable to use with query parameters.
19
/// @code
20
/// trx->Execute("update a_table set val = $1 where val = $2", null<int>, 0)
21
/// @endcode
22
template
<
typename
T
>
23
inline
constexpr
Null
<
T
>
null
{};
24
25
namespace
io
{
26
namespace
traits
{
27
28
template
<
typename
T>
29
struct
IsNullable
<
Null
<T>> : std::true_type {};
30
31
template
<
typename
T>
32
struct
GetSetNull
<
Null
<T>> {
33
inline
static
bool
IsNull(
const
Null
<T>&) {
return
true
; }
34
static
void
SetNull(T&) {}
35
};
36
37
template
<
typename
T
>
38
struct
IsMappedToPg
<
Null
<
T
>> :
IsMappedToPg
<
T
> {};
39
template
<
typename
T
>
40
struct
IsSpecialMapping
<
Null
<
T
>> :
IsMappedToPg
<
T
> {};
41
42
}
// namespace traits
43
44
template
<
typename
T
>
45
struct
CppToPg
<
Null
<
T
>> :
CppToPg
<
T
> {};
46
47
template
<
typename
T
>
48
struct
BufferFormatter
<
Null
<
T
>> {
49
explicit
BufferFormatter
(
const
Null
<
T
>&) {}
50
51
template
<
typename
Buffer
>
52
void
operator
()(
const
UserTypes
&,
Buffer
&)
const
{}
53
};
54
55
}
// namespace io
56
57
}
// namespace storages::postgres
58
59
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
storages
postgres
null.hpp
Generated on Wed May 15 2024 22:30:01 for userver by
Doxygen
1.10.0