开发者

How to see the query string of an NSPredicate or an NSFetchRequest?

开发者 https://www.devze.com 2023-01-03 21:56 出处:网络
Is it possible to see the completed query string, with all the variables substituted to their actual values? Would be good for debugging开发者_Python百科...You could just log the predicate with NSLog(

Is it possible to see the completed query string, with all the variables substituted to their actual values? Would be good for debugging开发者_Python百科...


You could just log the predicate with NSLog(@"%@", predicate). Most values will show directly, except those that are cast e.g. dates or bool. For those you will have to log the variable separately.


Yes, turn on Core Data debug and you will see the raw sql calls.

http://developer.apple.com/mac/library/documentation/cocoa/conceptual/CoreData/Articles/cdTroubleshooting.html

0

精彩评论

暂无评论...
验证码 换一张
取 消