infinitered / cdq

Core Data Query for RubyMotion
MIT License
172 stars 35 forks source link

How to use cdq to connect to sqlite #120

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi there, I am trying to application like dictionary, which need to load some data predefined in the database to the view. And I am planning to use sqlite to store all the data.

So, is it possible to connect to sqlite database or other database by cdq? And Map SQLite data to Ruby objects? Much appreciate if someone can guide me how to implement this!

kemiller commented 9 years ago

You cannot in general connect core data to an arbitrary SQLite database. If you want to use it, you'd need to pull your data out of your database ahead of time, and then load it into CoreData models, and then save the generated files. That's about all I know. Good luck!