I have used core data in开发者_StackOverflow社区 my apps. My application works fine in online and offline mode . I have doubt about, how to write a query in Core data(Similar SQLite). I wrote a query and used in SQLite. But I want to know about, how to write a query(select, insert, update, etc,.) using core data.
Please guide me and give me some useful links.
You should read though Apple's tutorial on Core Data. It goes through the process of making a very simple app that used Core Data. For more complicated queries you will want to make a predicate to restrict the returned values.
I think you cannot write SQL like query (select, insert, update...), rather you have to use NSPredicate objects. Which support such type of operation in its own way.
You can use predicate while fetching data . For more info , visit here
精彩评论