how can i use SQL statement in CoreData database ? which part of CoreData hand it ? thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it were possible to write your own SQL statements and have them executed through the Core Data framework, I think it would be described in the documentation for
NSPersistentStoreor one of its related classes. As far as I can tell, it isn’t.You can always use SQLite directly to load in (and query) the Core Data database without going through the Core Data framework. This can be done either by using SQLite’s own APIs, or the
sqlite3program that should already be installed on your Mac. I’m not sure why you’d want to do this on a database that’s already managed by Cora Data, though.