I am stuck up with below line and i am not have much knowledge on coredata ,
`NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(bookPath == %@) AND (accessed==%u)) AND (isCurrentSession==%u)", myString,[NSNumber numberWithBool:NO],[NSNumber numberWithBool:_accessed]];`
upto now i sent t开发者_JAVA百科wo values to my predicate, in the above predicate i am using three values,
My Question: can we apply two AND operations in a single predicate, can any one provide some idea about this.Thanks in Advance.
Yes, you should be able to combine predicates with 'AND' and 'OR' to an arbitrary level of complexity. The formal parser grammar for the predicate syntax can be found here.
For best performance you should order your predicate terms so that simple tests (e.g numeric comparisons) appear first in the format string and more complex tests (e.g. REGEX pattern matching) appear last.
精彩评论