⚠️ 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
query.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/storages/mysql/query.hpp
4
5
#
include
<
optional
>
6
#
include
<
string
>
7
8
#
include
<
userver
/
utils
/
strong_typedef
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
storages
::
mysql
{
13
14
/// @brief Query class, which driver executes.
15
class
Query
final
{
16
public
:
17
/// @brief Strong typedef for query name, one can use named queries to get
18
/// better logging experience
19
using
Name = utils::StrongTypedef<
struct
NameTag, std::string>;
20
21
/// @brief Query constructor
22
Query
(
const
char
* statement, std::optional<Name> name =
std
::
nullopt
);
23
24
/// @brief Query constructor
25
Query
(std::string statement, std::optional<Name> name =
std
::
nullopt
);
26
27
/// @brief Get query statement
28
const
std::string&
GetStatement
()
const
;
29
30
/// @brief Get query name
31
const
std
::
optional
<
Name
>&
GetName
()
const
;
32
33
private
:
34
std::string statement_;
35
std::optional<Name> name_;
36
};
37
38
}
// namespace storages::mysql
39
40
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
storages
mysql
query.hpp
Generated on Wed May 15 2024 22:22:16 for userver by
Doxygen
1.10.0