You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[x] Type-safety — really, type guidance (see below) —in filter comparisons.
14
14
-[x] Filtering, sorting, grouping, aggregate expressions, limits, etc.
15
15
-[x] Optionally eliminates the use of magic strings so common in Core Data
16
16
-[x] Query reuse, i.e., no side-effects from chaining
@@ -36,9 +36,12 @@ class Developer: NSManagedObject {
36
36
}
37
37
```
38
38
39
-
Given this data model, we can start making some queries:
39
+
Given this data model, we can start making some queries. But first, remember to `import PredicateQI`! Without this import, the compiler magic that allows the comparison expressions to be translated into the `NSPredicate` language won't work and in most cases you'll get mysterious compilation errors.
40
40
41
41
```swift
42
+
importCoreDataQueryInterface
43
+
importPredicateQI
44
+
42
45
// Which languages are known by at least two of the developers?
We can get the `NSFetchRequest` produced by the query by asking for its `fetchRequest` property. But it's usually easier just to execute the fetch request directly:
0 commit comments