5#include <userver/storages/postgres/options.hpp>
6#include <userver/storages/postgres/parameter_store.hpp>
7#include <userver/storages/postgres/postgres_fwd.hpp>
8#include <userver/storages/postgres/query.hpp>
9#include <userver/storages/postgres/result_set.hpp>
11#include <userver/storages/postgres/detail/connection_ptr.hpp>
12#include <userver/storages/postgres/detail/query_parameters.hpp>
13#include <userver/storages/postgres/detail/time_types.hpp>
15USERVER_NAMESPACE_BEGIN
21 explicit NonTransaction(
23 SteadyClock::time_point start_time = detail::SteadyClock::now());
25 NonTransaction(NonTransaction&&)
noexcept;
26 NonTransaction& operator=(NonTransaction&&)
noexcept;
28 NonTransaction(
const NonTransaction&) =
delete;
29 NonTransaction& operator=(
const NonTransaction&) =
delete;
38 template <
typename... Args>
39 ResultSet Execute(
const Query& query,
const Args&... args) {
40 return Execute(OptionalCommandControl{}, query, args...);
47 template <
typename... Args>
48 ResultSet Execute(OptionalCommandControl statement_cmd_ctl,
49 const Query& query,
const Args&... args) {
50 detail::StaticQueryParameters<
sizeof...(args)> params;
51 params.Write(GetConnectionUserTypes(), args...);
52 return DoExecute(query, detail::QueryParameters{params}, statement_cmd_ctl);
59 return Execute(OptionalCommandControl{}, statement, store);
65 ResultSet Execute(OptionalCommandControl statement_cmd_ctl,
69 ResultSet DoExecute(
const Query& query,
const detail::QueryParameters& params,
70 OptionalCommandControl statement_cmd_ctl);
71 const UserTypes& GetConnectionUserTypes()
const;
73 detail::ConnectionPtr conn_;