diff --git a/.swift-version b/.swift-version
index 8c50098..a3ec5a4 100644
--- a/.swift-version
+++ b/.swift-version
@@ -1 +1 @@
-3.1
+3.2
diff --git a/.travis.yml b/.travis.yml
index 5a30d91..174671a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: objective-c
-osx_image: xcode8.3
+osx_image: xcode9
sudo: false
git:
submodules: false
@@ -10,24 +10,29 @@ env:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
matrix:
- - DESTINATION="OS=10.3,name=iPhone 7" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=10.1,name=iPhone 7" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=8.4,name=iPhone 6" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=8.3,name=iPhone 5S" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=8.3,name=iPhone 5" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=8.3,name=iPhone 4S" SCHEME="CoreStore iOS" SDK=iphonesimulator10.3 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="arch=x86_64" SCHEME="CoreStore OSX" SDK=macosx10.12 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="CoreStore watchOS" SDK=watchsimulator3.2 RUN_TESTS="NO" POD_LINT="NO"
- - DESTINATION="OS=2.2,name=Apple Watch - 42mm" SCHEME="CoreStore watchOS" SDK=watchsimulator3.2 RUN_TESTS="NO" POD_LINT="NO"
- - DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="CoreStore tvOS" SDK=appletvsimulator10.2 RUN_TESTS="YES" POD_LINT="NO"
- - DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="CoreStore tvOS" SDK=appletvsimulator10.2 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=11.0,name=iPhone 8" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=10.3,name=iPhone 7" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=10.1,name=iPhone 7" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=8.4,name=iPhone 6" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=8.3,name=iPhone 5S" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=8.3,name=iPhone 5" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=8.3,name=iPhone 4S" SCHEME="CoreStore iOS" SDK=iphonesimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="arch=x86_64" SCHEME="CoreStore OSX" SDK=macosx10.13 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=4.0,name=Apple Watch - 42mm" SCHEME="CoreStore watchOS" SDK=watchsimulator4.0 RUN_TESTS="NO" POD_LINT="NO"
+ - DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="CoreStore watchOS" SDK=watchsimulator4.0 RUN_TESTS="NO" POD_LINT="NO"
+ - DESTINATION="OS=2.2,name=Apple Watch - 42mm" SCHEME="CoreStore watchOS" SDK=watchsimulator4.0 RUN_TESTS="NO" POD_LINT="NO"
+ - DESTINATION="OS=11.0,name=Apple TV 1080p" SCHEME="CoreStore tvOS" SDK=appletvsimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="CoreStore tvOS" SDK=appletvsimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
+ - DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="CoreStore tvOS" SDK=appletvsimulator11.0 RUN_TESTS="YES" POD_LINT="NO"
before_install:
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
- - curl -OlL "https://github.com/Carthage/Carthage/releases/download/0.23.0/Carthage.pkg"
+ - curl -OlL "https://github.com/Carthage/Carthage/releases/download/0.26.0/Carthage.pkg"
- sudo installer -pkg "Carthage.pkg" -target /
- rm "Carthage.pkg"
+ - npm install ios-sim -g
+ - ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-8, 11.0"
before_script:
- carthage update --use-submodules
script:
@@ -38,8 +43,8 @@ script:
xcodebuild -workspace CoreStore.xcworkspace -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO clean test | xcpretty -c;
xcodebuild -workspace CoreStore.xcworkspace -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO clean test | xcpretty -c;
fi
- - xcodebuild -workspace "CoreStore.xcworkspace" -scheme "CoreStore iOS" -sdk "iphonesimulator10.3" -destination "OS=10.3,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO clean test | xcpretty -c;
- - xcodebuild -workspace "CoreStore.xcworkspace" -scheme "CoreStore iOS" -sdk "iphonesimulator10.3" -destination "OS=10.3,name=iPhone 7" -configuration Release ONLY_ACTIVE_ARCH=NO clean test | xcpretty -c;
+ - xcodebuild -workspace "CoreStore.xcworkspace" -scheme "CoreStoreDemo" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 8" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+ - xcodebuild -workspace "CoreStore.xcworkspace" -scheme "CoreStoreDemo" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 8" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
- if [ $POD_LINT == "YES" ]; then
pod lib lint --quick;
fi
diff --git a/CoreStore.podspec b/CoreStore.podspec
index 949e802..5c3660e 100644
--- a/CoreStore.podspec
+++ b/CoreStore.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "CoreStore"
- s.version = "4.1.4"
+ s.version = "4.2.0"
s.license = "MIT"
s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift"
s.homepage = "https://github.com/JohnEstropia/CoreStore"
diff --git a/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift b/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift
index d50ca20..dc84a04 100644
--- a/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift
+++ b/CoreStoreDemo/CoreStoreDemo/List and Object Observers Demo/ObjectObserverDemoViewController.swift
@@ -85,7 +85,7 @@ class ObjectObserverDemoViewController: UIViewController, ObjectObserver {
// MARK: ObjectObserver
- func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: Palette, changedPersistentKeys: Set) {
+ func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: Palette, changedPersistentKeys: Set) {
self.reloadPaletteInfo(object, changedKeys: changedPersistentKeys)
}
diff --git a/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift b/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift
index 254c96e..5662123 100644
--- a/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift
+++ b/CoreStoreDemo/CoreStoreDemo/Transactions Demo/TransactionsDemoViewController.swift
@@ -131,7 +131,7 @@ class TransactionsDemoViewController: UIViewController, MKMapViewDelegate, Objec
// none
}
- func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: Place, changedPersistentKeys: Set) {
+ func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: Place, changedPersistentKeys: Set) {
if let mapView = self.mapView {
diff --git a/CoreStoreTests/ImportTests.swift b/CoreStoreTests/ImportTests.swift
index f2e221e..b248a10 100644
--- a/CoreStoreTests/ImportTests.swift
+++ b/CoreStoreTests/ImportTests.swift
@@ -36,33 +36,33 @@ class ImportTests: BaseTestDataTestCase {
@objc
dynamic func test_ThatAttributeProtocols_BehaveCorrectly() {
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: true))?.boolValue, true)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: Int16.max))?.int16Value, Int16.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: Int32.max))?.int32Value, Int32.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: Int64.max))?.int64Value, Int64.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: MAXFLOAT))?.floatValue, MAXFLOAT)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSNumber(value: Double(MAXFLOAT)))?.doubleValue, Double(MAXFLOAT))
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: true))?.boolValue, true)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: Int16.max))?.int16Value, Int16.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: Int32.max))?.int32Value, Int32.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: Int64.max))?.int64Value, Int64.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: MAXFLOAT))?.floatValue, MAXFLOAT)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSNumber(value: Double(MAXFLOAT)))?.doubleValue, Double(MAXFLOAT))
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: "1"))?.boolValue, true)
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int16.max.description))?.int16Value, Int16.max)
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int32.max.description))?.int32Value, Int32.max)
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int64.max.description))?.int64Value, Int64.max)
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.doubleValue, NSDecimalNumber(string: MAXFLOAT.description).doubleValue)
- XCTAssertEqual(NSDecimalNumber.cs_fromImportableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.floatValue, NSDecimalNumber(string: MAXFLOAT.description).floatValue)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: "1"))?.boolValue, true)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int16.max.description))?.int16Value, Int16.max)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int32.max.description))?.int32Value, Int32.max)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int64.max.description))?.int64Value, Int64.max)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.doubleValue, NSDecimalNumber(string: MAXFLOAT.description).doubleValue)
+ XCTAssertEqual(NSDecimalNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.floatValue, NSDecimalNumber(string: MAXFLOAT.description).floatValue)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: "1"))?.boolValue, true)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int16.max.description))?.int16Value, Int16.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int32.max.description))?.int32Value, Int32.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: Int64.max.description))?.int64Value, Int64.max)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.doubleValue, NSDecimalNumber(string: MAXFLOAT.description).doubleValue)
- XCTAssertEqual(NSNumber.cs_fromImportableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.floatValue, NSDecimalNumber(string: MAXFLOAT.description).floatValue)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: "1"))?.boolValue, true)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int16.max.description))?.int16Value, Int16.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int32.max.description))?.int32Value, Int32.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: Int64.max.description))?.int64Value, Int64.max)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.doubleValue, NSDecimalNumber(string: MAXFLOAT.description).doubleValue)
+ XCTAssertEqual(NSNumber.cs_fromQueryableNativeType(NSDecimalNumber(string: MAXFLOAT.description))?.floatValue, NSDecimalNumber(string: MAXFLOAT.description).floatValue)
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: true)))
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: Int16.max)))
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: Int32.max)))
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: Int64.max)))
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: MAXFLOAT)))
- XCTAssertNil(NSDecimalNumber.cs_fromImportableNativeType(NSNumber(value: Double(MAXFLOAT))))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: true)))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: Int16.max)))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: Int32.max)))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: Int64.max)))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: MAXFLOAT)))
+ XCTAssertNil(NSDecimalNumber.cs_fromQueryableNativeType(NSNumber(value: Double(MAXFLOAT))))
XCTAssertEqual(true.cs_toQueryableNativeType(), NSNumber(value: true))
XCTAssertEqual(Int16.max.cs_toQueryableNativeType(), NSNumber(value: Int16.max))
diff --git a/CoreStoreTests/ListObserverTests.swift b/CoreStoreTests/ListObserverTests.swift
index 5b1d68f..7e40beb 100644
--- a/CoreStoreTests/ListObserverTests.swift
+++ b/CoreStoreTests/ListObserverTests.swift
@@ -198,60 +198,58 @@ class ListObserverTests: BaseTestDataTestCase {
return events == 0
}
)
- for _ in 1 ... 2 {
-
- let didUpdateObjectExpectation = self.expectation(
- forNotification: "listMonitor:didUpdateObject:atIndexPath:",
- object: observer,
- handler: { (note) -> Bool in
+
+ let didUpdateObjectExpectation = self.expectation(
+ forNotification: "listMonitor:didUpdateObject:atIndexPath:",
+ object: observer,
+ handler: { (note) -> Bool in
+
+ XCTAssert(events == 1 || events == 2)
+
+ let userInfo = note.userInfo
+ XCTAssertNotNil(userInfo)
+ XCTAssertEqual(
+ Set(userInfo?.keys.map({ $0 as! String }) ?? []),
+ ["indexPath", "object"]
+ )
+
+ let indexPath = userInfo?["indexPath"] as? NSIndexPath
+ let object = userInfo?["object"] as? TestEntity1
+
+ switch object?.testEntityID {
- XCTAssert(events == 1 || events == 2)
+ case NSNumber(value: 101)?:
+ XCTAssertEqual(indexPath?.index(atPosition: 0), 1)
+ XCTAssertEqual(indexPath?.index(atPosition: 1), 0)
- let userInfo = note.userInfo
- XCTAssertNotNil(userInfo)
- XCTAssertEqual(
- Set(userInfo?.keys.map({ $0 as! String }) ?? []),
- ["indexPath", "object"]
- )
+ XCTAssertEqual(object?.testBoolean, NSNumber(value: true))
+ XCTAssertEqual(object?.testNumber, NSNumber(value: 11))
+ XCTAssertEqual(object?.testDecimal, NSDecimalNumber(string: "11"))
+ XCTAssertEqual(object?.testString, "nil:TestEntity1:11")
+ XCTAssertEqual(object?.testData, ("nil:TestEntity1:11" as NSString).data(using: String.Encoding.utf8.rawValue)!)
+ XCTAssertEqual(object?.testDate, self.dateFormatter.date(from: "2000-01-11T00:00:00Z")!)
- let indexPath = userInfo?["indexPath"] as? NSIndexPath
- let object = userInfo?["object"] as? TestEntity1
+ case NSNumber(value: 102)?:
+ XCTAssertEqual(indexPath?.index(atPosition: 0), 0)
+ XCTAssertEqual(indexPath?.index(atPosition: 1), 0)
- switch object?.testEntityID {
-
- case NSNumber(value: 101)?:
- XCTAssertEqual(indexPath?.index(atPosition: 0), 1)
- XCTAssertEqual(indexPath?.index(atPosition: 1), 0)
-
- XCTAssertEqual(object?.testBoolean, NSNumber(value: true))
- XCTAssertEqual(object?.testNumber, NSNumber(value: 11))
- XCTAssertEqual(object?.testDecimal, NSDecimalNumber(string: "11"))
- XCTAssertEqual(object?.testString, "nil:TestEntity1:11")
- XCTAssertEqual(object?.testData, ("nil:TestEntity1:11" as NSString).data(using: String.Encoding.utf8.rawValue)!)
- XCTAssertEqual(object?.testDate, self.dateFormatter.date(from: "2000-01-11T00:00:00Z")!)
-
- case NSNumber(value: 102)?:
- XCTAssertEqual(indexPath?.index(atPosition: 0), 0)
- XCTAssertEqual(indexPath?.index(atPosition: 1), 0)
-
- XCTAssertEqual(object?.testBoolean, NSNumber(value: false))
- XCTAssertEqual(object?.testNumber, NSNumber(value: 22))
- XCTAssertEqual(object?.testDecimal, NSDecimalNumber(string: "22"))
- XCTAssertEqual(object?.testString, "nil:TestEntity1:22")
- XCTAssertEqual(object?.testData, ("nil:TestEntity1:22" as NSString).data(using: String.Encoding.utf8.rawValue)!)
- XCTAssertEqual(object?.testDate, self.dateFormatter.date(from: "2000-01-22T00:00:00Z")!)
-
- default:
- XCTFail()
- }
- defer {
-
- events += 1
- }
- return events == 1 || events == 2
+ XCTAssertEqual(object?.testBoolean, NSNumber(value: false))
+ XCTAssertEqual(object?.testNumber, NSNumber(value: 22))
+ XCTAssertEqual(object?.testDecimal, NSDecimalNumber(string: "22"))
+ XCTAssertEqual(object?.testString, "nil:TestEntity1:22")
+ XCTAssertEqual(object?.testData, ("nil:TestEntity1:22" as NSString).data(using: String.Encoding.utf8.rawValue)!)
+ XCTAssertEqual(object?.testDate, self.dateFormatter.date(from: "2000-01-22T00:00:00Z")!)
+
+ default:
+ XCTFail()
}
- )
- }
+ defer {
+
+ events += 1
+ }
+ return events == 1 || events == 2
+ }
+ )
let didChangeExpectation = self.expectation(
forNotification: "listMonitorDidChange:",
object: observer,
@@ -453,38 +451,35 @@ class ListObserverTests: BaseTestDataTestCase {
return events == 0
}
)
- for _ in 1 ... 2 {
-
- let didUpdateObjectExpectation = self.expectation(
- forNotification: "listMonitor:didDeleteObject:fromIndexPath:",
- object: observer,
- handler: { (note) -> Bool in
+ let didUpdateObjectExpectation = self.expectation(
+ forNotification: "listMonitor:didDeleteObject:fromIndexPath:",
+ object: observer,
+ handler: { (note) -> Bool in
+
+ XCTAssert(events == 1 || events == 2)
+
+ let userInfo = note.userInfo
+ XCTAssertNotNil(userInfo)
+ XCTAssertEqual(
+ Set(userInfo?.keys.map({ $0 as! String }) ?? []),
+ ["indexPath", "object"]
+ )
+
+ let indexPath = userInfo?["indexPath"] as? NSIndexPath
+
+ XCTAssertEqual(indexPath?.section, 0)
+ XCTAssert(indexPath?.index(atPosition: 1) == 0 || indexPath?.index(atPosition: 1) == 1)
+
+ let object = userInfo?["object"] as? TestEntity1
+ XCTAssertEqual(object?.isDeleted, true)
+
+ defer {
- XCTAssert(events == 1 || events == 2)
-
- let userInfo = note.userInfo
- XCTAssertNotNil(userInfo)
- XCTAssertEqual(
- Set(userInfo?.keys.map({ $0 as! String }) ?? []),
- ["indexPath", "object"]
- )
-
- let indexPath = userInfo?["indexPath"] as? NSIndexPath
-
- XCTAssertEqual(indexPath?.section, 0)
- XCTAssert(indexPath?.index(atPosition: 1) == 0 || indexPath?.index(atPosition: 1) == 1)
-
- let object = userInfo?["object"] as? TestEntity1
- XCTAssertEqual(object?.isDeleted, true)
-
- defer {
-
- events += 1
- }
- return events == 1 || events == 2
+ events += 1
}
- )
- }
+ return events == 1 || events == 2
+ }
+ )
let didDeleteSectionExpectation = self.expectation(
forNotification: "listMonitor:didDeleteSection:fromSectionIndex:",
object: observer,
@@ -531,10 +526,11 @@ class ListObserverTests: BaseTestDataTestCase {
stack.perform(
asynchronous: { (transaction) -> Bool in
- transaction.deleteAll(
+ let count = transaction.deleteAll(
From(),
Where(#keyPath(TestEntity1.testBoolean), isEqualTo: false)
)
+ XCTAssertEqual(count, 2)
return transaction.hasChanges
},
success: { (hasChanges) in
diff --git a/CoreStoreTests/ObjectObserverTests.swift b/CoreStoreTests/ObjectObserverTests.swift
index 0b6c3d0..bc62132 100644
--- a/CoreStoreTests/ObjectObserverTests.swift
+++ b/CoreStoreTests/ObjectObserverTests.swift
@@ -219,7 +219,7 @@ class TestObjectObserver: ObjectObserver {
)
}
- func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: TestEntity1, changedPersistentKeys: Set) {
+ func objectMonitor(_ monitor: ObjectMonitor, didUpdateObject object: TestEntity1, changedPersistentKeys: Set) {
NotificationCenter.default.post(
name: NSNotification.Name(rawValue: "objectMonitor:didUpdateObject:changedPersistentKeys:"),
diff --git a/README.md b/README.md
index 58617bf..8c91861 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.1:** iOS 8+ / macOS 10.10+ / watchOS 2.0+ / tvOS 9.0+
-* Beta support: [Swift 3.2](https://github.com/JohnEstropia/CoreStore/tree/prototype/Swift_3_2), [Swift 4.0](https://github.com/JohnEstropia/CoreStore/tree/prototype/Swift_4_0)
+* **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)
-Upgrading from CoreStore 3.x to 4.x? Check out the [new features](#features) and make sure to read the [Migration guide](#upgrading-from-3xx-to-4xx).
+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).
CoreStore is now part of the [Swift Source Compatibility projects](https://swift.org/source-compatibility/#current-list-of-projects).
@@ -38,9 +38,9 @@ CoreStore was (and is) heavily shaped by real-world needs of developing data-dep
- **Clean fetching and querying API.** Fetching objects is easy, but querying for raw aggregates (`min`, `max`, etc.) and raw property values is now just as convenient. *(See [Fetching and querying](#fetching-and-querying))*
- **Type-safe, easy to configure observers.** You don't have to deal with the burden of setting up `NSFetchedResultsController`s and KVO. As an added bonus, `ListMonitor`s and `ObjectMonitor`s can have multiple observers. This means you can have multiple view controllers efficiently share a single resource! *(See [Observing changes and notifications](#observing-changes-and-notifications))*
- **Efficient importing utilities.** Map your entities once with their corresponding import source (JSON for example), and importing from *transactions* becomes elegant. Uniquing is also done with an efficient find-and-replace algorithm. *(See [Importing data](#importing-data))*
-- ⭐️ **New in 4.0: Say goodbye to *.xcdatamodeld* files!** The new `CoreStoreObject` is *the* replacement to `NSManagedObject`. `CoreStoreObject` subclasses can declare type-safe properties all in Swift code, no need to maintain separate resource files for the models. As bonus, these special properties support custom types, and can be used to create type-safe keypaths and queries. *(See [Type-safe `CoreStoreObject`s](#type-safe-corestoreobjects))*
+- **Say goodbye to *.xcdatamodeld* files!** The new `CoreStoreObject` is *the* replacement to `NSManagedObject`. `CoreStoreObject` subclasses can declare type-safe properties all in Swift code, no need to maintain separate resource files for the models. As bonus, these special properties support custom types, and can be used to create type-safe keypaths and queries. *(See [Type-safe `CoreStoreObject`s](#type-safe-corestoreobjects))*
- **Progressive migrations.** No need to think how to migrate from all previous model versions to your latest model. Just tell the `DataStack` the sequence of version strings (`MigrationChain`s) and CoreStore will automatically use progressive migrations when needed. *(See [Migrations](#migrations))*
-- ⭐️ **New in 4.0: Easier custom migrations.** Say goodbye to *.xcmappingmodel* files; CoreStore can now infer entity mappings when possible, while still allowing an easy way to write custom mappings. *(See [Migrations](#migrations))*
+- **Easier custom migrations.** Say goodbye to *.xcmappingmodel* files; CoreStore can now infer entity mappings when possible, while still allowing an easy way to write custom mappings. *(See [Migrations](#migrations))*
- **Plug-in your own logging framework.** Although a default logger is built-in, all logging, asserting, and error reporting can be funneled to `CoreStoreLogger` protocol implementations. *(See [Logging and error reporting](#logging-and-error-reporting))*
- **Heavy support for multiple persistent stores per data stack.** CoreStore lets you manage separate stores in a single `DataStack`, just the way *.xcdatamodeld* configurations are designed to. CoreStore will also manage one stack by default, but you can create and manage as many as you need. *(See [Setting up](#setting-up))*
- **Free to name entities and their class names independently.** CoreStore gets around a restriction with other Core Data wrappers where the entity name should be the same as the `NSManagedObject` subclass name. CoreStore loads entity-to-class mappings from the managed object model file, so you can assign different names for the entities and their class names.
@@ -95,8 +95,6 @@ CoreStore was (and is) heavily shaped by real-world needs of developing data-dep
- [Roadmap](#roadmap)
- [Installation](#installation)
- [Changesets](#changesets)
- - [Upgrading from 3.x.x to 4.x.x](#upgrading-from-3xx-to-4xx)
- - [Other Releases](#other-releases)
- [Contact](#contact)
- [Who uses CoreStore?](#who-uses-corestore)
- [License](#license)
@@ -1447,7 +1445,7 @@ class MyViewController: UIViewController, ObjectObserver {
// ...
}
- func objectMonitor(monitor: ObjectMonitor, didUpdateObject object: MyPersonEntity, changedPersistentKeys: Set) {
+ func objectMonitor(monitor: ObjectMonitor, didUpdateObject object: MyPersonEntity, changedPersistentKeys: Set) {
// ...
}
@@ -1675,7 +1673,7 @@ To use these syntax sugars, include *CoreStoreBridge.h* in your Objective-C sour
Starting CoreStore 4.0, we can now create persisted objects without depending on *.xcdatamodeld* Core Data files. The new `CoreStoreObject` subclass replaces `NSManagedObject`, and specially-typed properties declared on these classes will be synthesized as Core Data attributes.
```swift
class Animal: CoreStoreObject {
- let species = Value.Required("species")
+ let species = Value.Required("species", initial: "")
}
class Dog: Animal {
@@ -1684,14 +1682,14 @@ class Dog: Animal {
}
class Person: CoreStoreObject {
- let name = Value.Required("name")
+ let name = Value.Required("name", initial: "")
let pets = Relationship.ToManyUnordered("pets", inverse: { $0.master })
}
```
The property names to be saved to Core Data is specified as the `keyPath` argument. This lets us refactor our Swift code without affecting the underlying database. For example:
```swift
class Person: CoreStoreObject {
- private let _name = Value.Required("name")
+ private let _name = Value.Required("name", initial: "")
// ...
}
```
@@ -1832,22 +1830,6 @@ Add all *.swift* files to your project.
To use the Objective-C syntax sugars, import *CoreStoreBridge.h* in your *.m* source files.
# Changesets
-### Upgrading from 3.x.x to 4.x.x
-**Obsoleted**
-- `LegacySQLiteStore` is now finally obsoleted in favor of `SQLiteStore`. For sqlite files that were created previously with `LegacySQLiteStore`, make sure to use the `SQLiteStore.legacy(...)` factory method to create an `SQLiteStore` that can load the file from the legacy file path.
-- `SQLiteStore.init(...)`'s `mappingModelBundles` argument is now obsolete. The new initializer accepts a `migrationMappingProviders` optional argument where explicit mapping sources are declared. For reference on how to do this, read on [Custom migrations](#custom-migrations).
-
-**Deprecated**
-- `DataStack.beginAsynchronous(...)`, `DataStack.beginSynchronous(...)`, `AsynchronousDataTransaction.commit(...)`, and `SynchronousDataTransaction.commit(...)` are now deprecated in favor of `DataStack.perform(asynchronous:...)` and `DataStack.perform(synchronous:...)` family of methods. These new `perform(...)` methods are auto-commit, meaning the transaction automatically calls `commit()` internally after the transction closure completes. To roll-back and cancel a transaction, call `try transaction.cancel()`. Read [Saving and processing transactions](#saving-and-processing-transactions) for more details.
-
-**Other Changes**
-- `ListMonitor.refetch(...)` now works by recreating its internal `NSFetchedResultsController`. Previously `refetch(...)` would only apply new `FetchClause`s on top of previous fetches. Now all `FetchClauses` are required to be passed to `refetch(...)` each time it is called.
-- New important concepts on "Dynamic Models", "Schema", and "Schema Histories".
- - **Dynamic Models** (`DynamicObject` protocol): These are Core Data object types that any `NSManagedObject` or `CoreStoreObject`s conform to. *(See [Type-safe `CoreStoreObject`s](#type-safe-corestoreobjects))*
- - **Version Schema** (`DynamicSchema` protocol): These types contain info for a single model version, as well as entities that belong to it. Currently supports `XcodeDataModelSchema` (*.xcdatamodeld* file), `CoreStoreSchema`, or `UnsafeDataModelSchema`. *(See [Migrations](#migrations))*
- - **Schema History** (`SchemaHistory` class): This is now the preferred way to express all models to the `DataStack`. This class contains info to all the `DynamicSchema` across multiple model versions. *(See [Migrations](#migrations))*
-
-### Other Releases
For the full Changelog, refer to the [Releases](https://github.com/JohnEstropia/CoreStore/releases) page.
diff --git a/Sources/AsynchronousDataTransaction.swift b/Sources/AsynchronousDataTransaction.swift
index c3c2e3c..730bdfe 100644
--- a/Sources/AsynchronousDataTransaction.swift
+++ b/Sources/AsynchronousDataTransaction.swift
@@ -100,7 +100,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
- parameter into: the `Into` clause indicating the destination `NSManagedObject` or `CoreStoreObject` entity type and the destination configuration
- returns: a new `NSManagedObject` or `CoreStoreObject` instance of the specified entity type.
*/
- public override func create(_ into: Into) -> T {
+ public override func create(_ into: Into) -> T {
CoreStore.assert(
!self.isCommitted,
@@ -133,7 +133,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
- parameter objectID: the `NSManagedObjectID` for the object to be edited
- returns: an editable proxy for the specified `NSManagedObject` or `CoreStoreObject`.
*/
- public override func edit(_ into: Into, _ objectID: NSManagedObjectID) -> T? {
+ public override func edit(_ into: Into, _ objectID: NSManagedObjectID) -> T? {
CoreStore.assert(
!self.isCommitted,
@@ -267,9 +267,9 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
}
switch childTransaction.result {
- case nil: return nil
- case (let hasChanges, nil)?: return SaveResult(hasChanges: hasChanges)
- case (_, let error?)?: return SaveResult(error)
+ case .none: return nil
+ case .some(let hasChanges, nil): return SaveResult(hasChanges: hasChanges)
+ case .some(_, let error?): return SaveResult(error)
}
}
}
diff --git a/Sources/AttributeProtocol.swift b/Sources/AttributeProtocol.swift
index dd51238..9d6c017 100644
--- a/Sources/AttributeProtocol.swift
+++ b/Sources/AttributeProtocol.swift
@@ -33,7 +33,7 @@ internal protocol AttributeProtocol: class {
static var attributeType: NSAttributeType { get }
- var keyPath: KeyPath { get }
+ var keyPath: RawKeyPath { get }
var isOptional: Bool { get }
var isIndexed: Bool { get }
var isTransient: Bool { get }
diff --git a/Sources/BaseDataTransaction+Querying.swift b/Sources/BaseDataTransaction+Querying.swift
index 4fa9893..776507f 100644
--- a/Sources/BaseDataTransaction+Querying.swift
+++ b/Sources/BaseDataTransaction+Querying.swift
@@ -39,7 +39,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- returns: the number of `DynamicObject`s deleted
*/
@discardableResult
- public func deleteAll(_ from: From, _ deleteClauses: DeleteClause...) -> Int? {
+ public func deleteAll(_ from: From, _ deleteClauses: DeleteClause...) -> Int? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -57,7 +57,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- returns: the number of `DynamicObject`s deleted
*/
@discardableResult
- public func deleteAll(_ from: From, _ deleteClauses: [DeleteClause]) -> Int? {
+ public func deleteAll(_ from: From, _ deleteClauses: [DeleteClause]) -> Int? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -121,7 +121,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the first `DynamicObject` instance that satisfies the specified `FetchClause`s
*/
- public func fetchOne(_ from: From, _ fetchClauses: FetchClause...) -> T? {
+ public func fetchOne(_ from: From, _ fetchClauses: FetchClause...) -> T? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -137,7 +137,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the first `DynamicObject` instance that satisfies the specified `FetchClause`s
*/
- public func fetchOne(_ from: From, _ fetchClauses: [FetchClause]) -> T? {
+ public func fetchOne(_ from: From, _ fetchClauses: [FetchClause]) -> T? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -153,7 +153,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: all `DynamicObject` instances that satisfy the specified `FetchClause`s
*/
- public func fetchAll(_ from: From, _ fetchClauses: FetchClause...) -> [T]? {
+ public func fetchAll(_ from: From, _ fetchClauses: FetchClause...) -> [T]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -169,7 +169,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: all `DynamicObject` instances that satisfy the specified `FetchClause`s
*/
- public func fetchAll(_ from: From, _ fetchClauses: [FetchClause]) -> [T]? {
+ public func fetchAll(_ from: From, _ fetchClauses: [FetchClause]) -> [T]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -185,7 +185,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the number `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public func fetchCount(_ from: From, _ fetchClauses: FetchClause...) -> Int? {
+ public func fetchCount(_ from: From, _ fetchClauses: FetchClause...) -> Int? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -201,7 +201,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the number `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public func fetchCount(_ from: From, _ fetchClauses: [FetchClause]) -> Int? {
+ public func fetchCount(_ from: From, _ fetchClauses: [FetchClause]) -> Int? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -217,7 +217,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for the first `DynamicObject` that satisfies the specified `FetchClause`s
*/
- public func fetchObjectID(_ from: From, _ fetchClauses: FetchClause...) -> NSManagedObjectID? {
+ public func fetchObjectID(_ from: From, _ fetchClauses: FetchClause...) -> NSManagedObjectID? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -233,7 +233,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for the first `DynamicObject` that satisfies the specified `FetchClause`s
*/
- public func fetchObjectID(_ from: From, _ fetchClauses: [FetchClause]) -> NSManagedObjectID? {
+ public func fetchObjectID(_ from: From, _ fetchClauses: [FetchClause]) -> NSManagedObjectID? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -249,7 +249,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for all `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public func fetchObjectIDs(_ from: From, _ fetchClauses: FetchClause...) -> [NSManagedObjectID]? {
+ public func fetchObjectIDs(_ from: From, _ fetchClauses: FetchClause...) -> [NSManagedObjectID]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -265,7 +265,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for all `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public func fetchObjectIDs(_ from: From, _ fetchClauses: [FetchClause]) -> [NSManagedObjectID]? {
+ public func fetchObjectIDs(_ from: From, _ fetchClauses: [FetchClause]) -> [NSManagedObjectID]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -287,7 +287,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> U? {
+ public func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> U? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -306,7 +306,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> U? {
+ public func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> U? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -325,7 +325,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> [[String: Any]]? {
+ public func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> [[String: Any]]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
@@ -344,7 +344,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> [[String: Any]]? {
+ public func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> [[String: Any]]? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
diff --git a/Sources/BaseDataTransaction.swift b/Sources/BaseDataTransaction.swift
index a422bf6..84e943c 100644
--- a/Sources/BaseDataTransaction.swift
+++ b/Sources/BaseDataTransaction.swift
@@ -50,7 +50,7 @@ public /*abstract*/ class BaseDataTransaction {
- parameter into: the `Into` clause indicating the destination `NSManagedObject` or `CoreStoreObject` entity type and the destination configuration
- returns: a new `NSManagedObject` or `CoreStoreObject` instance of the specified entity type.
*/
- public func create(_ into: Into) -> T {
+ public func create(_ into: Into) -> T {
let entityClass = into.entityClass
CoreStore.assert(
@@ -141,7 +141,7 @@ public /*abstract*/ class BaseDataTransaction {
- parameter objectID: the `NSManagedObjectID` for the object to be edited
- returns: an editable proxy for the specified `NSManagedObject`.
*/
- public func edit(_ into: Into, _ objectID: NSManagedObjectID) -> T? {
+ public func edit(_ into: Into, _ objectID: NSManagedObjectID) -> T? {
CoreStore.assert(
self.isRunningInAllowedQueue(),
diff --git a/Sources/CSGroupBy.swift b/Sources/CSGroupBy.swift
index 27c331d..189f0a4 100644
--- a/Sources/CSGroupBy.swift
+++ b/Sources/CSGroupBy.swift
@@ -41,7 +41,7 @@ public final class CSGroupBy: NSObject, CSQueryClause, CoreStoreObjectiveCType {
The list of key path strings to group results with
*/
@objc
- public var keyPaths: [KeyPath] {
+ public var keyPaths: [RawKeyPath] {
return self.bridgeToSwift.keyPaths
}
@@ -52,7 +52,7 @@ public final class CSGroupBy: NSObject, CSQueryClause, CoreStoreObjectiveCType {
- parameter keyPath: a key path string to group results with
*/
@objc
- public convenience init(keyPath: KeyPath) {
+ public convenience init(keyPath: RawKeyPath) {
self.init(GroupBy(keyPath))
}
@@ -63,7 +63,7 @@ public final class CSGroupBy: NSObject, CSQueryClause, CoreStoreObjectiveCType {
- parameter keyPaths: a list of key path strings to group results with
*/
@objc
- public convenience init(keyPaths: [KeyPath]) {
+ public convenience init(keyPaths: [RawKeyPath]) {
self.init(GroupBy(keyPaths))
}
diff --git a/Sources/CSSectionBy.swift b/Sources/CSSectionBy.swift
index 6533fa0..ba0a93c 100644
--- a/Sources/CSSectionBy.swift
+++ b/Sources/CSSectionBy.swift
@@ -45,7 +45,7 @@ public final class CSSectionBy: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections
*/
@objc
- public static func keyPath(_ sectionKeyPath: KeyPath) -> CSSectionBy {
+ public static func keyPath(_ sectionKeyPath: RawKeyPath) -> CSSectionBy {
return self.init(SectionBy(sectionKeyPath))
}
@@ -58,7 +58,7 @@ public final class CSSectionBy: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections
*/
@objc
- public static func keyPath(_ sectionKeyPath: KeyPath, sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) -> CSSectionBy {
+ public static func keyPath(_ sectionKeyPath: RawKeyPath, sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) -> CSSectionBy {
return self.init(SectionBy(sectionKeyPath, sectionIndexTransformer))
}
diff --git a/Sources/CSSelect.swift b/Sources/CSSelect.swift
index 74fa947..d755766 100644
--- a/Sources/CSSelect.swift
+++ b/Sources/CSSelect.swift
@@ -48,7 +48,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- parameter keyPath: the attribute name
*/
@objc
- public convenience init(keyPath: KeyPath) {
+ public convenience init(keyPath: RawKeyPath) {
self.init(.attribute(keyPath))
}
@@ -65,7 +65,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the average value of an attribute
*/
@objc
- public static func average(_ keyPath: KeyPath, as alias: KeyPath?) -> CSSelectTerm {
+ public static func average(_ keyPath: RawKeyPath, as alias: RawKeyPath?) -> CSSelectTerm {
return self.init(.average(keyPath, as: alias))
}
@@ -82,7 +82,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `SelectTerm` to a `Select` clause for a count query
*/
@objc
- public static func count(_ keyPath: KeyPath, as alias: KeyPath?) -> CSSelectTerm {
+ public static func count(_ keyPath: RawKeyPath, as alias: RawKeyPath?) -> CSSelectTerm {
return self.init(.count(keyPath, as: alias))
}
@@ -99,7 +99,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the maximum value for an attribute
*/
@objc
- public static func maximum(_ keyPath: KeyPath, as alias: KeyPath?) -> CSSelectTerm {
+ public static func maximum(_ keyPath: RawKeyPath, as alias: RawKeyPath?) -> CSSelectTerm {
return self.init(.maximum(keyPath, as: alias))
}
@@ -116,7 +116,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the minimum value for an attribute
*/
@objc
- public static func minimum(_ keyPath: KeyPath, as alias: KeyPath?) -> CSSelectTerm {
+ public static func minimum(_ keyPath: RawKeyPath, as alias: RawKeyPath?) -> CSSelectTerm {
return self.init(.minimum(keyPath, as: alias))
}
@@ -133,7 +133,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `CSSelectTerm` to a `CSSelect` clause for querying the sum value for an attribute
*/
@objc
- public static func sum(_ keyPath: KeyPath, as alias: KeyPath?) -> CSSelectTerm {
+ public static func sum(_ keyPath: RawKeyPath, as alias: RawKeyPath?) -> CSSelectTerm {
return self.init(.sum(keyPath, as: alias))
}
@@ -150,7 +150,7 @@ public final class CSSelectTerm: NSObject, CoreStoreObjectiveCType {
- returns: a `SelectTerm` to a `Select` clause for querying the sum value for an attribute
*/
@objc
- public static func objectIDAs(_ alias: KeyPath? = nil) -> CSSelectTerm {
+ public static func objectIDAs(_ alias: RawKeyPath? = nil) -> CSSelectTerm {
return self.init(.objectID(as: alias))
}
@@ -365,7 +365,7 @@ public final class CSSelect: NSObject {
super.init()
}
- public init(_ swiftValue: Select) {
+ public init(_ swiftValue: Select) {
self.attributeType = .undefinedAttributeType
self.selectTerms = swiftValue.selectTerms
diff --git a/Sources/CSSetupResult.swift b/Sources/CSSetupResult.swift
index 124b255..2171945 100644
--- a/Sources/CSSetupResult.swift
+++ b/Sources/CSSetupResult.swift
@@ -152,7 +152,7 @@ public final class CSSetupResult: NSObject {
// MARK: CoreStoreObjectiveCType
- public required init(_ swiftValue: SetupResult) where T: CoreStoreSwiftType, T.ObjectiveCType: CSStorageInterface {
+ public required init(_ swiftValue: SetupResult) where T: CoreStoreSwiftType, T.ObjectiveCType: CSStorageInterface {
switch swiftValue {
diff --git a/Sources/CSWhere.swift b/Sources/CSWhere.swift
index 50813d7..5949990 100644
--- a/Sources/CSWhere.swift
+++ b/Sources/CSWhere.swift
@@ -85,7 +85,7 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
- parameter value: the arguments for the `==` operator
*/
@objc
- public convenience init(keyPath: KeyPath, isEqualTo value: CoreDataNativeType?) {
+ public convenience init(keyPath: RawKeyPath, isEqualTo value: CoreDataNativeType?) {
self.init(value == nil || value is NSNull
? Where("\(keyPath) == nil")
@@ -99,7 +99,7 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
- parameter list: the array to check membership of
*/
@objc
- public convenience init(keyPath: KeyPath, isMemberOf list: [CoreDataNativeType]) {
+ public convenience init(keyPath: RawKeyPath, isMemberOf list: [CoreDataNativeType]) {
self.init(Where("\(keyPath) IN %@", list as NSArray))
}
diff --git a/Sources/ClauseTypes.swift b/Sources/ClauseTypes.swift
index df207bb..b03f3e2 100644
--- a/Sources/ClauseTypes.swift
+++ b/Sources/ClauseTypes.swift
@@ -34,7 +34,7 @@ import CoreData
*/
public protocol FetchClause {
- func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
+ func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
}
@@ -45,7 +45,7 @@ public protocol FetchClause {
*/
public protocol QueryClause {
- func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
+ func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
}
@@ -56,5 +56,5 @@ public protocol QueryClause {
*/
public protocol DeleteClause {
- func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
+ func applyToFetchRequest(_ fetchRequest: NSFetchRequest)
}
diff --git a/Sources/CoreStore+CustomDebugStringConvertible.swift b/Sources/CoreStore+CustomDebugStringConvertible.swift
index a1f5e80..ca39d52 100644
--- a/Sources/CoreStore+CustomDebugStringConvertible.swift
+++ b/Sources/CoreStore+CustomDebugStringConvertible.swift
@@ -1215,6 +1215,8 @@ extension NSAttributeType: CoreStoreDebugStringConvertible {
case .binaryDataAttributeType: return ".binaryDataAttributeType"
case .transformableAttributeType: return ".transformableAttributeType"
case .objectIDAttributeType: return ".objectIDAttributeType"
+ case .UUIDAttributeType: return ".UUIDAttributeType"
+ case .URIAttributeType: return ".URIAttributeType"
}
}
}
diff --git a/Sources/CoreStore+Migration.swift b/Sources/CoreStore+Migration.swift
index 8f16239..f93d6c9 100644
--- a/Sources/CoreStore+Migration.swift
+++ b/Sources/CoreStore+Migration.swift
@@ -47,7 +47,7 @@ public extension CoreStore {
- parameter storage: the storage
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `SetupResult` argument indicates the result. Note that the `StorageInterface` associated to the `SetupResult.success` may not always be the same instance as the parameter argument if a previous `StorageInterface` was already added at the same URL and with the same configuration.
*/
- public static func addStorage(_ storage: T, completion: @escaping (SetupResult) -> Void) {
+ public static func addStorage(_ storage: T, completion: @escaping (SetupResult) -> Void) {
self.defaultStack.addStorage(storage, completion: completion)
}
diff --git a/Sources/CoreStore+Observing.swift b/Sources/CoreStore+Observing.swift
index 53828fd..d5e543b 100644
--- a/Sources/CoreStore+Observing.swift
+++ b/Sources/CoreStore+Observing.swift
@@ -38,7 +38,7 @@ public extension CoreStore {
- parameter object: the `DynamicObject` to observe changes from
- returns: a `ObjectMonitor` that monitors changes to `object`
*/
- public static func monitorObject(_ object: T) -> ObjectMonitor {
+ public static func monitorObject(_ object: T) -> ObjectMonitor {
return self.defaultStack.monitorObject(object)
}
@@ -50,7 +50,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: a `ListMonitor` instance that monitors changes to the list
*/
- public static func monitorList(_ from: From, _ fetchClauses: FetchClause...) -> ListMonitor {
+ public static func monitorList(_ from: From, _ fetchClauses: FetchClause...) -> ListMonitor {
return self.defaultStack.monitorList(from, fetchClauses)
}
@@ -62,7 +62,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: a `ListMonitor` instance that monitors changes to the list
*/
- public static func monitorList(_ from: From, _ fetchClauses: [FetchClause]) -> ListMonitor {
+ public static func monitorList(_ from: From, _ fetchClauses: [FetchClause]) -> ListMonitor {
return self.defaultStack.monitorList(from, fetchClauses)
}
@@ -74,7 +74,7 @@ public extension CoreStore {
- parameter from: a `From` clause indicating the entity type
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
*/
- public static func monitorList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ fetchClauses: FetchClause...) {
+ public static func monitorList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ fetchClauses: FetchClause...) {
self.defaultStack.monitorList(createAsynchronously: createAsynchronously, from, fetchClauses)
}
@@ -86,7 +86,7 @@ public extension CoreStore {
- parameter from: a `From` clause indicating the entity type
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
*/
- public static func monitorList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ fetchClauses: [FetchClause]) {
+ public static func monitorList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ fetchClauses: [FetchClause]) {
self.defaultStack.monitorList(createAsynchronously: createAsynchronously, from, fetchClauses)
}
@@ -99,7 +99,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: a `ListMonitor` instance that monitors changes to the list
*/
- public static func monitorSectionedList(_ from: From, _ sectionBy: SectionBy, _ fetchClauses: FetchClause...) -> ListMonitor {
+ public static func monitorSectionedList(_ from: From, _ sectionBy: SectionBy, _ fetchClauses: FetchClause...) -> ListMonitor {
return self.defaultStack.monitorSectionedList(from, sectionBy, fetchClauses)
}
@@ -112,7 +112,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: a `ListMonitor` instance that monitors changes to the list
*/
- public static func monitorSectionedList(_ from: From, _ sectionBy: SectionBy, _ fetchClauses: [FetchClause]) -> ListMonitor {
+ public static func monitorSectionedList(_ from: From, _ sectionBy: SectionBy, _ fetchClauses: [FetchClause]) -> ListMonitor {
return self.defaultStack.monitorSectionedList(from, sectionBy, fetchClauses)
}
@@ -125,7 +125,7 @@ public extension CoreStore {
- parameter sectionBy: a `SectionBy` clause indicating the keyPath for the attribute to use when sorting the list into sections.
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
*/
- public static func monitorSectionedList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ sectionBy: SectionBy, _ fetchClauses: FetchClause...) {
+ public static func monitorSectionedList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ sectionBy: SectionBy, _ fetchClauses: FetchClause...) {
self.defaultStack.monitorSectionedList(createAsynchronously: createAsynchronously, from, sectionBy, fetchClauses)
}
@@ -138,7 +138,7 @@ public extension CoreStore {
- parameter sectionBy: a `SectionBy` clause indicating the keyPath for the attribute to use when sorting the list into sections.
- parameter fetchClauses: a series of `FetchClause` instances for fetching the object list. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
*/
- public static func monitorSectionedList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ sectionBy: SectionBy, _ fetchClauses: [FetchClause]) {
+ public static func monitorSectionedList(createAsynchronously: @escaping (ListMonitor) -> Void, _ from: From, _ sectionBy: SectionBy, _ fetchClauses: [FetchClause]) {
self.defaultStack.monitorSectionedList(createAsynchronously: createAsynchronously, from, sectionBy, fetchClauses)
}
diff --git a/Sources/CoreStore+Querying.swift b/Sources/CoreStore+Querying.swift
index 67e7812..48cf117 100644
--- a/Sources/CoreStore+Querying.swift
+++ b/Sources/CoreStore+Querying.swift
@@ -82,7 +82,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the first `DynamicObject` instance that satisfies the specified `FetchClause`s
*/
- public static func fetchOne(_ from: From, _ fetchClauses: FetchClause...) -> T? {
+ public static func fetchOne(_ from: From, _ fetchClauses: FetchClause...) -> T? {
return self.defaultStack.fetchOne(from, fetchClauses)
}
@@ -94,7 +94,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the first `DynamicObject` instance that satisfies the specified `FetchClause`s
*/
- public static func fetchOne(_ from: From, _ fetchClauses: [FetchClause]) -> T? {
+ public static func fetchOne(_ from: From, _ fetchClauses: [FetchClause]) -> T? {
return self.defaultStack.fetchOne(from, fetchClauses)
}
@@ -106,7 +106,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: all `DynamicObject` instances that satisfy the specified `FetchClause`s
*/
- public static func fetchAll(_ from: From, _ fetchClauses: FetchClause...) -> [T]? {
+ public static func fetchAll(_ from: From, _ fetchClauses: FetchClause...) -> [T]? {
return self.defaultStack.fetchAll(from, fetchClauses)
}
@@ -118,7 +118,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: all `DynamicObject` instances that satisfy the specified `FetchClause`s
*/
- public static func fetchAll(_ from: From, _ fetchClauses: [FetchClause]) -> [T]? {
+ public static func fetchAll(_ from: From, _ fetchClauses: [FetchClause]) -> [T]? {
return self.defaultStack.fetchAll(from, fetchClauses)
}
@@ -130,7 +130,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the number `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public static func fetchCount(_ from: From, _ fetchClauses: FetchClause...) -> Int? {
+ public static func fetchCount(_ from: From, _ fetchClauses: FetchClause...) -> Int? {
return self.defaultStack.fetchCount(from, fetchClauses)
}
@@ -142,7 +142,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the number `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public static func fetchCount(_ from: From, _ fetchClauses: [FetchClause]) -> Int? {
+ public static func fetchCount(_ from: From, _ fetchClauses: [FetchClause]) -> Int? {
return self.defaultStack.fetchCount(from, fetchClauses)
}
@@ -154,7 +154,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for the first `DynamicObject` that satisfies the specified `FetchClause`s
*/
- public static func fetchObjectID(_ from: From, _ fetchClauses: FetchClause...) -> NSManagedObjectID? {
+ public static func fetchObjectID(_ from: From, _ fetchClauses: FetchClause...) -> NSManagedObjectID? {
return self.defaultStack.fetchObjectID(from, fetchClauses)
}
@@ -166,7 +166,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for the first `DynamicObject` that satisfies the specified `FetchClause`s
*/
- public static func fetchObjectID(_ from: From, _ fetchClauses: [FetchClause]) -> NSManagedObjectID? {
+ public static func fetchObjectID(_ from: From, _ fetchClauses: [FetchClause]) -> NSManagedObjectID? {
return self.defaultStack.fetchObjectID(from, fetchClauses)
}
@@ -178,7 +178,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for all `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public static func fetchObjectIDs(_ from: From, _ fetchClauses: FetchClause...) -> [NSManagedObjectID]? {
+ public static func fetchObjectIDs(_ from: From, _ fetchClauses: FetchClause...) -> [NSManagedObjectID]? {
return self.defaultStack.fetchObjectIDs(from, fetchClauses)
}
@@ -190,7 +190,7 @@ public extension CoreStore {
- parameter fetchClauses: a series of `FetchClause` instances for the fetch request. Accepts `Where`, `OrderBy`, and `Tweak` clauses.
- returns: the `NSManagedObjectID` for all `DynamicObject`s that satisfy the specified `FetchClause`s
*/
- public static func fetchObjectIDs(_ from: From, _ fetchClauses: [FetchClause]) -> [NSManagedObjectID]? {
+ public static func fetchObjectIDs(_ from: From, _ fetchClauses: [FetchClause]) -> [NSManagedObjectID]? {
return self.defaultStack.fetchObjectIDs(from, fetchClauses)
}
@@ -205,7 +205,7 @@ public extension CoreStore {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public static func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> U? {
+ public static func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> U? {
return self.defaultStack.queryValue(from, selectClause, queryClauses)
}
@@ -220,7 +220,7 @@ public extension CoreStore {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public static func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> U? {
+ public static func queryValue(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> U? {
return self.defaultStack.queryValue(from, selectClause, queryClauses)
}
@@ -235,7 +235,7 @@ public extension CoreStore {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public static func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> [[String: Any]]? {
+ public static func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: QueryClause...) -> [[String: Any]]? {
return self.defaultStack.queryAttributes(from, selectClause, queryClauses)
}
@@ -250,7 +250,7 @@ public extension CoreStore {
- parameter queryClauses: a series of `QueryClause` instances for the query request. Accepts `Where`, `OrderBy`, `GroupBy`, and `Tweak` clauses.
- returns: the result of the the query. The type of the return value is specified by the generic type of the `Select` parameter.
*/
- public static func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> [[String: Any]]? {
+ public static func queryAttributes(_ from: From, _ selectClause: Select, _ queryClauses: [QueryClause]) -> [[String: Any]]? {
return self.defaultStack.queryAttributes(from, selectClause, queryClauses)
}
diff --git a/Sources/CoreStoreBridge.h b/Sources/CoreStoreBridge.h
index 9af4fe2..407258d 100644
--- a/Sources/CoreStoreBridge.h
+++ b/Sources/CoreStoreBridge.h
@@ -43,7 +43,7 @@
#define CORESTORE_RETURNS_RETAINED __attribute__((ns_returns_retained))
-#pragma mark - KeyPath Utilities
+#pragma mark - RawKeyPath Utilities
#define CSKeyPath(type, property) ({ \
type *_je_keypath_dummy __attribute__((unused)); \
diff --git a/Sources/CoreStoreFetchRequest+CoreStore.swift b/Sources/CoreStoreFetchRequest+CoreStore.swift
index cd2c3fb..735b6c6 100644
--- a/Sources/CoreStoreFetchRequest+CoreStore.swift
+++ b/Sources/CoreStoreFetchRequest+CoreStore.swift
@@ -34,7 +34,7 @@ internal extension CoreStoreFetchRequest {
// MARK: Internal
@nonobjc @inline(__always)
- internal func dynamicCast() -> NSFetchRequest {
+ internal func dynamicCast() -> NSFetchRequest {
return unsafeBitCast(self, to: NSFetchRequest.self)
}
diff --git a/Sources/CoreStoreFetchedResultsController.swift b/Sources/CoreStoreFetchedResultsController.swift
index a5802d3..6fe2cf3 100644
--- a/Sources/CoreStoreFetchedResultsController.swift
+++ b/Sources/CoreStoreFetchedResultsController.swift
@@ -35,7 +35,7 @@ internal final class CoreStoreFetchedResultsController: NSFetchedResultsControll
// MARK: Internal
@nonobjc
- internal convenience init(dataStack: DataStack, fetchRequest: NSFetchRequest