userver: uPg bytea support
No Matches
uPg bytea support

The driver allows reading and writing raw binary data from/to PostgreSQL bytea type.

Reading and writing to PostgreSQL is implemented for std::string, std::string_view and std::vector of char or unsigned char.

When reading to std::string_view the value MUST NOT be used after the PostgreSQL result set is destroyed.
namespace pg = storages::postgres;
using namespace std::string_literals;
std::string s = "\0\xff\x0afoobar"s;
trx.Execute("select $1", pg::Bytea(tp));

uPg: Arrays | MongoDB