userver: storages::postgres::RowTag Struct Reference
No Matches
storages::postgres::RowTag Struct Reference

#include <userver/storages/postgres/io/row_types.hpp>

Detailed Description

Tag type to disambiguate reading the row to a user's row type (values of the row initialize user's type data members).

const auto res = GetConn()->Execute("select $1, $2", 42, "foobar");
using TupleType = std::tuple<int, std::string>;
auto tuple = res.AsSingleRow<TupleType>(storages::postgres::kRowTag);
EXPECT_EQ(std::get<0>(tuple), 42);
EXPECT_EQ(std::get<1>(tuple), "foobar");

Definition at line 19 of file row_types.hpp.

The documentation for this struct was generated from the following file: