userver: storages::postgres::FieldTag Struct Reference
Loading...
Searching...
No Matches
storages::postgres::FieldTag Struct Reference

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

Detailed Description

Tag type to disambiguate reading the first value of a row to a user's composite type (PostgreSQL composite type in the row initializes user's type).

auto result = GetConn()->Execute("select ROW($1, $2)", 42, 3.14);
using TupleType = std::tuple<int, double>;
auto tuple = result.AsSingleRow<TupleType>(storages::postgres::kFieldTag);
EXPECT_EQ(std::get<0>(tuple), 42);

Definition at line 26 of file row_types.hpp.


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