From 49c4b770eb7a2715baa74476d377928043a3e875 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Fri, 10 Nov 2017 19:19:48 +0900 Subject: [PATCH] WIP: Readme --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 613f227..e6aa319 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,10 @@ Unleashing the real power of Core Data with the elegance and safety of Swift

-* **Swift 3.2:** iOS 8+ / macOS 10.10+ / watchOS 2.0+ / tvOS 9.0+ -* Other Swift versions: [Swift 3.1(version 4.1.4)](https://github.com/JohnEstropia/CoreStore/tree/4.1.4), [Swift 4.0](https://github.com/JohnEstropia/CoreStore/tree/5.0.0) +* **Swift 4.0:** iOS 8+ / macOS 10.10+ / watchOS 2.0+ / tvOS 9.0+ +* Other Swift versions: [Swift 3.2(version 4.2.3)](https://github.com/JohnEstropia/CoreStore/tree/4.2.3) -Upgrading from CoreStore 4.1 (Swift 3.1) to 4.2 (Swift 3.2)? Check out the [new features](#features) and make sure to read the [Change logs](https://github.com/JohnEstropia/CoreStore/releases). +Upgrading from CoreStore 4.2 (Swift 3.2) to 5.0 (Swift 4.0)? Check out the [new features](#features) and make sure to read the [Change logs](https://github.com/JohnEstropia/CoreStore/releases). CoreStore is now part of the [Swift Source Compatibility projects](https://swift.org/source-compatibility/#current-list-of-projects). @@ -146,20 +146,18 @@ let people = CoreStore.fetchAll(From()) Fetching objects (complex): ```swift let people = CoreStore.fetchAll( - From(), - Where("age > 30"), - OrderBy(.ascending("name"), .descending("age")), - Tweak { (fetchRequest) -> Void in - fetchRequest.includesPendingChanges = false - } + From() + .where(\.age > 30), + .orderBy(.ascending(\.name), .descending(.\age)), + .tweak({ $0.includesPendingChanges = false }) ) ``` Querying values: ```swift let maxAge = CoreStore.queryValue( - From(), - Select(.maximum("age")) + From() + .select(Int.self, .maximum(\.age)) ) ```