2
私はthisを達成しようとしており、間接的にそれを行う方法を知っています...もし私がテーブルのスキーマを取得できれば。どのようにしてsociのテーブルのスキーマまたは行名を取得できますか?
どうすればよいですか?
私が試してみました:
std::string i;
soci::statement st = (mSql->prepare <<
"show create table tab;",
soci::into(i));
st.execute();
while (st.fetch())
{
std::cout << i <<'\n';
}
だけ "タブ" が印刷されます。
私はまた、GitHubの中Sociのドキュメントから、これを試してみました:
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
}
しかしcolumn_infoはSOCIのメンバーではないと言われました。