[odb-users] Native sqlite3 recursive SQL query

MM finjulhich at gmail.com
Fri Jun 15 15:34:19 EDT 2018


I have a sqlite database, where odb generates the schema and code to access
persistent objects.
However, there are unrelated tables and I would like to access the result
of a recursive single-column SELECT on those unrelated tables, the
resulting column is TEXT

std::ostringstream oss;
oss << "SELECT mycolumn FROM sometable WHERE id IN (.."
       << myparameter << "...)";
auto nbr_rows = odb::database::execute( oss.str() );

surrounded by a transaction

Is there a way to get the resulting mycolumn as a std::vector<std::string> ?

Thank you,

More information about the odb-users mailing list