3

I'm currently learning ios core data and I understand that core data is based on sqlite.

I can find documentations on core data at apple's developer, but there seem to be no documentation on sqlite. However, sqlite does have its own website and documentation.

I was wondering, does ios has its own sqlite documentation? Or everything at https://www.sqlite.org/docs.html is applicable to ios sqlite?

Thor
  • 9,638
  • 15
  • 62
  • 137

2 Answers2

3

Yes, the http://sqlite.org/cintro.html and http://sqlite.org/c3ref/funclist.html documentation works for Swift. See https://stackoverflow.com/a/28642293/1271826 for example of how you can do it. But you might want to find a nice Swift SQLite wrapper class to get you out of the weeds of SQLite's C API (as well as avoiding pitfalls of leaking because you didn't follow the excruciatingly detailed steps required by SQLite's C API).

That having been said, if you're using CoreData, I'd encourage you to stick with the CoreData API, and not dip into SQLite's C API. But, if you want bypass CoreData entirely and only interact directly with SQLite, you can do it like suggested above. But I might suggest really sticking with CoreData unless you have a compelling reason not to.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
2

Everything at sqlite.org/docs.html is applicable in iOS SqLite ...because Core Data is only for iOS but SqLite is available for many platforms ..

dev_m
  • 796
  • 6
  • 12