userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/storages/odbc/tests/utils.hpp
4
/// @brief Utilities for testing logic working with ODBC.
5
6
#
include
<
userver
/
storages
/
odbc
.
hpp
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
namespace
storages::
odbc
::tests {
11
12
constexpr
auto
kDSN =
13
"DRIVER={PostgreSQL Unicode};"
14
"SERVER=localhost;"
15
"PORT=15433;"
16
"DATABASE=postgres;"
17
"UID=testsuite;"
18
"PWD=password;"
;
19
20
inline
const
auto
kHostSettings = storages::
odbc
::settings::HostSettings{kDSN, {}};
21
inline
const
auto
kSettings = storages::
odbc
::settings::ODBCClusterSettings{{kHostSettings}};
22
inline
const
auto
kMultiDSNSettings = storages::
odbc
::settings::ODBCClusterSettings{{kHostSettings, kHostSettings}};
23
24
inline
storages::
odbc
::
Cluster
MakeCluster(
const
storages::
odbc
::settings::ODBCClusterSettings& settings = kSettings) {
25
return
storages::
odbc
::
Cluster
{settings,
nullptr
};
26
}
27
28
}
// namespace storages::odbc::tests
29
30
USERVER_NAMESPACE_END
odbc
include
userver
storages
odbc
tests
utils.hpp
Generated on
for userver by
Doxygen
1.17.0