Skip to content

Commit fa5a955

Browse files
committed
README
1 parent 9203ddc commit fa5a955

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@ pod 'CoreDataQueryInterface', '~> 5.0'
4747

4848
The overall syntax of CDQI is unchanged from previous versions, as the examples in this document show. But there are small changes.
4949

50-
First, `EntityQuery`, `ExpressionQuery` and the like are gone, replaced by a single type `Query<M, R>`. The first generic parameter is the type of managed object model to work with. The second parameter is the result type, which must conform to the `NSFetchResultType` protocol. So instead of saying `EntityQuery.from(Project.self)` we say `Query<Project, NSDictionary>.from(Project.self)`.
50+
First, `EntityQuery`, `ExpressionQuery` and the like are gone, replaced by a single type `Query<M, R>`. The first generic parameter is the type of managed object model to work with. The second parameter is the result type, which must conform to the `NSFetchResultType` protocol. So instead of saying `EntityQuery.from(Project.self)`, just create an instance with `Query<Project, NSDictionary>()`.
5151

52-
The second major difference is the use of prefixes on methods, properties, and type aliases. CDQI extends types like `String`,
52+
The second major difference is the use of prefixes on methods, properties, and type aliases. CDQI extends common types like `String`, `NSExpression`, and so on. Previous versions of CDQI added method and property names that had a higher likelihood of conflict with other frameworks or future changes by Apple. To mitigate this, methods, properties, and associated types that may be added to arbitrary types use the `cdqi` or `CDQI` prefix as appropriate. For example:
53+
54+
```swift
55+
public protocol ExpressionConvertible {
56+
var cdqiExpression: NSExpression { get }
57+
}
58+
59+
public protocol TypedExpressionConvertible: ExpressionConvertible, Typed {
60+
associatedtype CDQIComparisonType: Typed
61+
}
62+
```
5363

5464
### Attribute Proxies
5565

0 commit comments

Comments
 (0)