I don’t think the iOS SQliteDatabase class is available for desktop yet… But I was thing of writing some code for desktop with an eye to the future…
Looking at the iOS docs for SQLiteDatabase, I don’t see the FieldSchema, TableSchema and IndexSchema methods that the desktop class has.
Is this just a documentation oversight? If not, is there another way to get that info or are there plans to add them later?
Getting it all out of sqlite_master does not look easy and certainly would be specific to SQLite!
Actually trivial for sqlite
See the SQLite docs http://sqlite.org/pragma.html#pragma_table_info
along the lines of
dim rs as recordset = sqlselect("#pragma table_info("+tablename+")" )
dim rs as recordset = sqlselect("#pragma foreign_key_list("+tablename+")" )
The iOS SQLiteDatabase class won’t be coming to the desktop. Eventually there is going to be a new database API that is available on all platforms, uses the new framework types, and addresses issues we’ve stumbled onto over the years with our existing APIs.
Thanks Joe and Norm,
Norm, I forgot about the Pragmas, thanks for reminding me!