sqlite_modern_cpp
sqlite_modern_cpp copied to clipboard
[Need help] how to get column name, type and row count for select *
Sorry asking here but I wanted to use this library for my project but how to get name of columns, data type of columns and number of retuned rows for “select * from ...” kind of queries? In example provided, especially lambdas, exact columns with right types need to be added but I don’t don’t know what query I receive so I want extract column name and data type from result. Any simple example please.
so you're looking for something like this?
db << "SELECT * FROM table"
>> [](const vector<pair<string, variant<int64, double, string, blob_t, null_t>>>& kvps) { ... };