I am trying to accomplish this, and I know how to do it indirectly...if I can get the schema of a table.
How can I do this using soci?
I have tried:
std::string i;
soci::statement st = (mSql->prepare <<
"show create table tab;",
soci::into(i));
st.execute();
while (st.fetch())
{
std::cout << i <<'\n';
}
but only "tab" gets printed.
I also tried this, from the Soci documentation in GitHub:
soci::column_info ci;
soci::statement st = (mSql->prepare_column_descriptions(table_name), into(ci));
st.execute();
while (st.fetch())
{
// ci fields describe each column in turn
}
but was told that column_info is not a member of soci.