jeudi 24 septembre 2015

CoreData and preload sqlite

I am trying to preload sqlite for coredata. I tried tutorials like this and it is okay.

http://ift.tt/1LgniY8

But, for some part, I am a bit unclear.

1) Is coredata layer is on top on sqlite? Or they have separate database?

2) What is the way of preloading sqlite? Is it like reading sqlite row 1 by 1 and save to core data? Or we ask core data to use sqlite file as base database?

 if managedObjectContext.save(&error) != true {} //From that example, it read csv file and save to core data..

3) If it is reading sqlite row 1 by 1, and if I have thousands of row, it will be slow. Can I just make core data point to my sqlite file?

Aucun commentaire:

Enregistrer un commentaire