How can I export data from an sqlite3 database in Objective-c? Can I issue a dump command at least? What options do I have for exporting?
I'm not aware of any built-in method for dumping a SQLite database in the sqlite api . However, I imagine you could probably cook something up to find all tables and their schemas, then SELECT * FROM each one and export it as a text file manually.
You can look into how the .dump command is implemented by the sqlite shell, to see how you can accomplish the same thing. In particular take a look at the dump_callback function and also the actions taken when the word dump is seen by the shell
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.