Is it safe for my iOS application to depend on the functionality of specific pragma statements when interfacing with a SQLite database?
According to the SQLite documentation:
Specific pragma statements may be removed and others added in future releases of SQLite. There is no guarantee of backwards compatibility.
However, according to this upvoted SO answer:
You can use a pragma to get the indexed columns:
PRAGMA index_info(index-name);
And this one to get the column names for a table:
PRAGMA table_info(table-name);
My specific use case is that I would like my iOS application to check if a specific column exists before making a query via the FMDB SQLite wrapper. I am afraid that using PRAGMA table_info(table-name)
may give unexpected results in a hypothetical future release of iOS that includes a newer version of SQLite in which the maintainers decided to drop support for this pragma statement.