Hi,
I'm wondering if there is a way to get information about the format of tables in
an existing Sqlite database. Specifically, I would like to get the list of
columns and the data type of each column. Obviously we can query the
sqlite_master table and parse the CREATE TABLE statements ourselves, but it
would be preferable by far to let Sqlite's SQL parser do this for us.
I thought that we could perhaps prepare a SQL statement based on the CREATE
TABLE statement and use sqlite3_column_type and so forth to get the schema
information. But it doesn't seem like you can prepare a CREATE TABLE statement
for a database that already exists, even if you don't plan to execute it. Other
than that, I wasn't able to locate any APIs that would be applicable.
Many thanks in advance for any pointers,
Matt