userver
userver copied to clipboard
Success parse of pg text to cpp integer
branch develop, commit 1d0bafae7f093ccf653a490fb5fb59b6f2b0fa99
I expected to see a parsing error but this test passed:
pg::ResultSet res{nullptr};
UEXPECT_NO_THROW(res = GetConn()->Execute("select '40'::text"));
int tgt_int = 0;
const int expected_int = 0x3430;
UEXPECT_NO_THROW(res[0][0].To(tgt_int));
EXPECT_EQ(tgt_int, expected_int);