Thor
Thor

Reputation: 10038

ios sqlite api documentation

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?

Upvotes: 3

Views: 970

Answers (2)

Rob
Rob

Reputation: 437532

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.

Upvotes: 3

dev_m
dev_m

Reputation: 806

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 ..

Upvotes: 2

Related Questions