libpqxx release candidate start8 stream parameter

10 hours ago 2
ARTICLE AD BOX

I'm slowly porting a project to work with the libpqxx release candidate start8 and have a question, I have this method

std::vector<std::string> WordleBusinessLayer::GetWordleAttemptsArrayByIdStream(int id)
{
std::vector<std::string> Attempts;

std::ostringstream oss; oss \<\< "select get_wordle_attempts_array_by_id(" \<\< id \<\< ")"; std::string sql(oss.str()); std::cout \<\< sql \<\< "\\n"; try { for (auto \[arr\] : this-\>da.PGTransaction.stream\<pqxx::array\<std::string\>\> (sql)) { Attempts.assign(arr.begin(), arr.end()); } } catch (const std::exception& ex) { std::cout \<\< ex.what() \<\< "\\n"; } return Attempts;

}

which works but I would like to add the parameter properly using pqxx::params(id) but I'm out of ideas
Anyone here know how to do it

Kind regards

Pete Kane

Read Entire Article