mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-30 14:21:49 +02:00
Swift 4 support
This commit is contained in:
@@ -1667,27 +1667,27 @@
|
|||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
2F03A52F19C5C6DA005002A5 = {
|
2F03A52F19C5C6DA005002A5 = {
|
||||||
CreatedOnToolsVersion = 6.0;
|
CreatedOnToolsVersion = 6.0;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
2F03A53A19C5C6DA005002A5 = {
|
2F03A53A19C5C6DA005002A5 = {
|
||||||
CreatedOnToolsVersion = 6.0;
|
CreatedOnToolsVersion = 6.0;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
82BA18881C4BBCBA00A0916E = {
|
82BA18881C4BBCBA00A0916E = {
|
||||||
CreatedOnToolsVersion = 7.2;
|
CreatedOnToolsVersion = 7.2;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
82BA18911C4BBCBA00A0916E = {
|
82BA18911C4BBCBA00A0916E = {
|
||||||
CreatedOnToolsVersion = 7.2;
|
CreatedOnToolsVersion = 7.2;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
B52DD1731BE1F8CC00949AFE = {
|
B52DD1731BE1F8CC00949AFE = {
|
||||||
CreatedOnToolsVersion = 7.1;
|
CreatedOnToolsVersion = 7.1;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
B52DD17C1BE1F8CC00949AFE = {
|
B52DD17C1BE1F8CC00949AFE = {
|
||||||
CreatedOnToolsVersion = 7.1;
|
CreatedOnToolsVersion = 7.1;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
B563216E1BD65082006C9394 = {
|
B563216E1BD65082006C9394 = {
|
||||||
CreatedOnToolsVersion = 7.0.1;
|
CreatedOnToolsVersion = 7.0.1;
|
||||||
@@ -2550,6 +2550,7 @@
|
|||||||
PRODUCT_NAME = CoreStore;
|
PRODUCT_NAME = CoreStore;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@@ -2602,6 +2603,7 @@
|
|||||||
PRODUCT_NAME = CoreStore;
|
PRODUCT_NAME = CoreStore;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
@@ -2625,7 +2627,8 @@
|
|||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -2643,7 +2646,8 @@
|
|||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -2663,7 +2667,8 @@
|
|||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -2678,7 +2683,8 @@
|
|||||||
PRODUCT_NAME = CoreStoreTests;
|
PRODUCT_NAME = CoreStoreTests;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -2698,7 +2704,8 @@
|
|||||||
SDKROOT = appletvos;
|
SDKROOT = appletvos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
TARGETED_DEVICE_FAMILY = 3;
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -2719,7 +2726,8 @@
|
|||||||
SDKROOT = appletvos;
|
SDKROOT = appletvos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
TARGETED_DEVICE_FAMILY = 3;
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -2737,7 +2745,8 @@
|
|||||||
SDKROOT = appletvos;
|
SDKROOT = appletvos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
TARGETED_DEVICE_FAMILY = 3;
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -2755,7 +2764,8 @@
|
|||||||
PRODUCT_NAME = CoreStoreTests;
|
PRODUCT_NAME = CoreStoreTests;
|
||||||
SDKROOT = appletvos;
|
SDKROOT = appletvos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
TARGETED_DEVICE_FAMILY = 3;
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -2779,7 +2789,8 @@
|
|||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -2803,7 +2814,8 @@
|
|||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -2823,7 +2835,8 @@
|
|||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -2843,7 +2856,8 @@
|
|||||||
PRODUCT_NAME = CoreStoreTests;
|
PRODUCT_NAME = CoreStoreTests;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreStoreTests/CoreStoreTests-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -2864,6 +2878,7 @@
|
|||||||
SDKROOT = watchos;
|
SDKROOT = watchos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 3.0;
|
||||||
TARGETED_DEVICE_FAMILY = 4;
|
TARGETED_DEVICE_FAMILY = 4;
|
||||||
};
|
};
|
||||||
@@ -2887,6 +2902,7 @@
|
|||||||
SDKROOT = watchos;
|
SDKROOT = watchos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 3.0;
|
||||||
TARGETED_DEVICE_FAMILY = 4;
|
TARGETED_DEVICE_FAMILY = 4;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -270,7 +270,7 @@
|
|||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
B54AAD481AF4D26E00848AE0 = {
|
B54AAD481AF4D26E00848AE0 = {
|
||||||
CreatedOnToolsVersion = 6.3;
|
CreatedOnToolsVersion = 6.3;
|
||||||
LastSwiftMigration = 0800;
|
LastSwiftMigration = 0900;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -407,6 +407,7 @@
|
|||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -445,6 +446,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -458,7 +460,8 @@
|
|||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -472,7 +475,8 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
SWIFT_VERSION = 4.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class MigrationsDemoViewController: UIViewController, ListObserver, UITableViewD
|
|||||||
|
|
||||||
let dna = (self.listMonitor?[indexPath] as? OrganismProtocol)?.dna.description ?? ""
|
let dna = (self.listMonitor?[indexPath] as? OrganismProtocol)?.dna.description ?? ""
|
||||||
cell.dnaLabel?.text = "DNA: \(dna)"
|
cell.dnaLabel?.text = "DNA: \(dna)"
|
||||||
cell.mutateButtonHandler = { [weak self] _ -> Void in
|
cell.mutateButtonHandler = { [weak self] () -> Void in
|
||||||
|
|
||||||
guard let `self` = self,
|
guard let `self` = self,
|
||||||
let dataStack = self.dataStack,
|
let dataStack = self.dataStack,
|
||||||
@@ -361,9 +361,10 @@ class MigrationsDemoViewController: UIViewController, ListObserver, UITableViewD
|
|||||||
|
|
||||||
self.segmentedControl?.selectedSegmentIndex = self.models
|
self.segmentedControl?.selectedSegmentIndex = self.models
|
||||||
.index(
|
.index(
|
||||||
where: { (_, _, schemaHistory) -> Bool in
|
where: { (arg) -> Bool in
|
||||||
|
|
||||||
schemaHistory.currentModelVersion == model.schemaHistory.currentModelVersion
|
let (_, _, schemaHistory) = arg
|
||||||
|
return schemaHistory.currentModelVersion == model.schemaHistory.currentModelVersion
|
||||||
}
|
}
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class DynamicModelTests: BaseTestDataTestCase {
|
|||||||
XCTAssertEqual(dog.master.value, person)
|
XCTAssertEqual(dog.master.value, person)
|
||||||
XCTAssertEqual(dog.master.value?.pets.value.first, dog)
|
XCTAssertEqual(dog.master.value?.pets.value.first, dog)
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
updateDone.fulfill()
|
updateDone.fulfill()
|
||||||
},
|
},
|
||||||
@@ -171,7 +171,7 @@ class DynamicModelTests: BaseTestDataTestCase {
|
|||||||
let p3 = Dog.where({ $0.age == 10 })
|
let p3 = Dog.where({ $0.age == 10 })
|
||||||
XCTAssertEqual(p3.predicate, NSPredicate(format: "%K == %d", "age", 10))
|
XCTAssertEqual(p3.predicate, NSPredicate(format: "%K == %d", "age", 10))
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
fetchDone.fulfill()
|
fetchDone.fulfill()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ final class FetchTests: BaseTestDataTestCase {
|
|||||||
|
|
||||||
try transaction.cancel()
|
try transaction.cancel()
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
XCTFail()
|
XCTFail()
|
||||||
},
|
},
|
||||||
@@ -246,7 +246,7 @@ final class FetchTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
try transaction.cancel()
|
try transaction.cancel()
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
XCTFail()
|
XCTFail()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -565,7 +565,9 @@ class ImportTests: BaseTestDataTestCase {
|
|||||||
XCTAssertEqual(objects.count, 2)
|
XCTAssertEqual(objects.count, 2)
|
||||||
|
|
||||||
zip(objects, sourceArray)
|
zip(objects, sourceArray)
|
||||||
.forEach { object, dictionary in
|
.forEach {
|
||||||
|
|
||||||
|
let (object, dictionary) = $0
|
||||||
XCTAssertEqual(object.testEntityID, dictionary[(#keyPath(TestEntity1.testEntityID))] as? NSNumber)
|
XCTAssertEqual(object.testEntityID, dictionary[(#keyPath(TestEntity1.testEntityID))] as? NSNumber)
|
||||||
XCTAssertEqual(object.testBoolean, dictionary[(#keyPath(TestEntity1.testBoolean))] as? NSNumber)
|
XCTAssertEqual(object.testBoolean, dictionary[(#keyPath(TestEntity1.testBoolean))] as? NSNumber)
|
||||||
XCTAssertEqual(object.testNumber, dictionary[(#keyPath(TestEntity1.testNumber))] as? NSNumber)
|
XCTAssertEqual(object.testNumber, dictionary[(#keyPath(TestEntity1.testNumber))] as? NSNumber)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let willChangeExpectation = self.expectation(
|
let willChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorWillChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorWillChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didInsertSectionExpectation = self.expectation(
|
let didInsertSectionExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didInsertSection:toSectionIndex:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didInsertSection:toSectionIndex:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didInsertObjectExpectation = self.expectation(
|
let didInsertObjectExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didInsertObject:toIndexPath:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didInsertObject:toIndexPath:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didChangeExpectation = self.expectation(
|
let didChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorDidChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorDidChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let willChangeExpectation = self.expectation(
|
let willChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorWillChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorWillChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
)
|
)
|
||||||
|
|
||||||
let didUpdateObjectExpectation = self.expectation(
|
let didUpdateObjectExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didUpdateObject:atIndexPath:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didUpdateObject:atIndexPath:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didChangeExpectation = self.expectation(
|
let didChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorDidChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorDidChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let willChangeExpectation = self.expectation(
|
let willChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorWillChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorWillChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didMoveObjectExpectation = self.expectation(
|
let didMoveObjectExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didMoveObject:fromIndexPath:toIndexPath:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didMoveObject:fromIndexPath:toIndexPath:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didChangeExpectation = self.expectation(
|
let didChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorDidChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorDidChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let willChangeExpectation = self.expectation(
|
let willChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorWillChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorWillChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didUpdateObjectExpectation = self.expectation(
|
let didUpdateObjectExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didDeleteObject:fromIndexPath:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didDeleteObject:fromIndexPath:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -481,7 +481,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didDeleteSectionExpectation = self.expectation(
|
let didDeleteSectionExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didDeleteSection:fromSectionIndex:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didDeleteSection:fromSectionIndex:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -509,7 +509,7 @@ class ListObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didChangeExpectation = self.expectation(
|
let didChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorDidChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorDidChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class ObjectObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let willUpdateExpectation = self.expectation(
|
let willUpdateExpectation = self.expectation(
|
||||||
forNotification: "objectMonitor:willUpdateObject:",
|
forNotification: NSNotification.Name(rawValue: "objectMonitor:willUpdateObject:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ class ObjectObserverTests: BaseTestDataTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didUpdateExpectation = self.expectation(
|
let didUpdateExpectation = self.expectation(
|
||||||
forNotification: "objectMonitor:didUpdateObject:changedPersistentKeys:",
|
forNotification: NSNotification.Name(rawValue: "objectMonitor:didUpdateObject:changedPersistentKeys:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ class ObjectObserverTests: BaseTestDataTestCase {
|
|||||||
var events = 0
|
var events = 0
|
||||||
|
|
||||||
let didDeleteExpectation = self.expectation(
|
let didDeleteExpectation = self.expectation(
|
||||||
forNotification: "objectMonitor:didDeleteObject:",
|
forNotification: NSNotification.Name(rawValue: "objectMonitor:didDeleteObject:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
|
|
||||||
var events = 0
|
var events = 0
|
||||||
let willChangeExpectation = self.expectation(
|
let willChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorWillChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorWillChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didInsertObjectExpectation = self.expectation(
|
let didInsertObjectExpectation = self.expectation(
|
||||||
forNotification: "listMonitor:didInsertObject:toIndexPath:",
|
forNotification: NSNotification.Name(rawValue: "listMonitor:didInsertObject:toIndexPath:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -448,7 +448,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
let didChangeExpectation = self.expectation(
|
let didChangeExpectation = self.expectation(
|
||||||
forNotification: "listMonitorDidChange:",
|
forNotification: NSNotification.Name(rawValue: "listMonitorDidChange:"),
|
||||||
object: observer,
|
object: observer,
|
||||||
handler: { (note) -> Bool in
|
handler: { (note) -> Bool in
|
||||||
|
|
||||||
@@ -737,7 +737,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
createDiscardExpectation.fulfill()
|
createDiscardExpectation.fulfill()
|
||||||
try transaction.cancel()
|
try transaction.cancel()
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
XCTFail()
|
XCTFail()
|
||||||
},
|
},
|
||||||
@@ -795,7 +795,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
|
|
||||||
try transaction.cancel()
|
try transaction.cancel()
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
XCTFail()
|
XCTFail()
|
||||||
},
|
},
|
||||||
@@ -828,7 +828,7 @@ final class TransactionTests: BaseTestCase {
|
|||||||
|
|
||||||
try transaction.cancel()
|
try transaction.cancel()
|
||||||
},
|
},
|
||||||
success: {
|
success: { _ in
|
||||||
|
|
||||||
XCTFail()
|
XCTFail()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
|
|||||||
self.isCommitted = true
|
self.isCommitted = true
|
||||||
let group = DispatchGroup()
|
let group = DispatchGroup()
|
||||||
group.enter()
|
group.enter()
|
||||||
self.context.saveAsynchronouslyWithCompletion { (result) -> Void in
|
self.context.saveAsynchronouslyWithCompletion { (hasChanges, error) -> Void in
|
||||||
|
|
||||||
completion(result.0, result.1)
|
completion(hasChanges, error)
|
||||||
self.result = result
|
self.result = (hasChanges, error)
|
||||||
group.leave()
|
group.leave()
|
||||||
}
|
}
|
||||||
group.wait()
|
group.wait()
|
||||||
@@ -226,12 +226,15 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
|
|||||||
!self.isCommitted,
|
!self.isCommitted,
|
||||||
"Attempted to commit a \(cs_typeName(self)) more than once."
|
"Attempted to commit a \(cs_typeName(self)) more than once."
|
||||||
)
|
)
|
||||||
self.autoCommit { (result) in
|
self.autoCommit { (hasChanges, error) in
|
||||||
|
|
||||||
switch result {
|
if let error = error {
|
||||||
|
|
||||||
case (let hasChanges, nil): completion(SaveResult(hasChanges: hasChanges))
|
completion(SaveResult(error))
|
||||||
case (_, let error?): completion(SaveResult(error))
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
completion(SaveResult(hasChanges: hasChanges))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,12 +54,15 @@ public final class CSAsynchronousDataTransaction: CSBaseDataTransaction, CoreSto
|
|||||||
!self.bridgeToSwift.isCommitted,
|
!self.bridgeToSwift.isCommitted,
|
||||||
"Attempted to commit a \(cs_typeName(self)) more than once."
|
"Attempted to commit a \(cs_typeName(self)) more than once."
|
||||||
)
|
)
|
||||||
self.bridgeToSwift.autoCommit { (result) in
|
self.bridgeToSwift.autoCommit { (_, error) in
|
||||||
|
|
||||||
switch result {
|
if let error = error {
|
||||||
|
|
||||||
case (_, nil): success?()
|
failure?(error.bridgeToObjectiveC)
|
||||||
case (_, let error?): failure?(error.bridgeToObjectiveC)
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
success?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ public final class CSSelect: NSObject {
|
|||||||
```
|
```
|
||||||
- parameter numberTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter numberTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(numberTerm: CSSelectTerm) {
|
public convenience init(numberTerm: CSSelectTerm) {
|
||||||
|
|
||||||
self.init(Select<NSNumber>(numberTerm.bridgeToSwift))
|
self.init(Select<NSNumber>(numberTerm.bridgeToSwift))
|
||||||
@@ -233,6 +234,7 @@ public final class CSSelect: NSObject {
|
|||||||
```
|
```
|
||||||
- parameter decimalTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter decimalTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(decimalTerm: CSSelectTerm) {
|
public convenience init(decimalTerm: CSSelectTerm) {
|
||||||
|
|
||||||
self.init(Select<NSDecimalNumber>(decimalTerm.bridgeToSwift))
|
self.init(Select<NSDecimalNumber>(decimalTerm.bridgeToSwift))
|
||||||
@@ -248,6 +250,7 @@ public final class CSSelect: NSObject {
|
|||||||
```
|
```
|
||||||
- parameter stringTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter stringTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(stringTerm: CSSelectTerm) {
|
public convenience init(stringTerm: CSSelectTerm) {
|
||||||
|
|
||||||
self.init(Select<NSString>(stringTerm.bridgeToSwift))
|
self.init(Select<NSString>(stringTerm.bridgeToSwift))
|
||||||
@@ -263,6 +266,7 @@ public final class CSSelect: NSObject {
|
|||||||
```
|
```
|
||||||
- parameter dateTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter dateTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(dateTerm: CSSelectTerm) {
|
public convenience init(dateTerm: CSSelectTerm) {
|
||||||
|
|
||||||
self.init(Select<Date>(dateTerm.bridgeToSwift))
|
self.init(Select<Date>(dateTerm.bridgeToSwift))
|
||||||
@@ -278,6 +282,7 @@ public final class CSSelect: NSObject {
|
|||||||
```
|
```
|
||||||
- parameter dataTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter dataTerm: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(dataTerm: CSSelectTerm) {
|
public convenience init(dataTerm: CSSelectTerm) {
|
||||||
|
|
||||||
self.init(Select<Data>(dataTerm.bridgeToSwift))
|
self.init(Select<Data>(dataTerm.bridgeToSwift))
|
||||||
@@ -292,6 +297,7 @@ public final class CSSelect: NSObject {
|
|||||||
// ...
|
// ...
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public convenience init(objectIDTerm: ()) {
|
public convenience init(objectIDTerm: ()) {
|
||||||
|
|
||||||
self.init(Select<NSManagedObjectID>(.objectID()))
|
self.init(Select<NSManagedObjectID>(.objectID()))
|
||||||
@@ -307,6 +313,7 @@ public final class CSSelect: NSObject {
|
|||||||
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
- parameter term: the `CSSelectTerm` specifying the attribute/aggregate value to query
|
||||||
- returns: a `CSSelect` clause for querying an entity attribute
|
- returns: a `CSSelect` clause for querying an entity attribute
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public static func dictionaryForTerm(_ term: CSSelectTerm) -> CSSelect {
|
public static func dictionaryForTerm(_ term: CSSelectTerm) -> CSSelect {
|
||||||
|
|
||||||
return self.init(Select<NSDictionary>(term.bridgeToSwift))
|
return self.init(Select<NSDictionary>(term.bridgeToSwift))
|
||||||
@@ -325,6 +332,7 @@ public final class CSSelect: NSObject {
|
|||||||
- parameter terms: the `CSSelectTerm`s specifying the attribute/aggregate values to query
|
- parameter terms: the `CSSelectTerm`s specifying the attribute/aggregate values to query
|
||||||
- returns: a `CSSelect` clause for querying an entity attribute
|
- returns: a `CSSelect` clause for querying an entity attribute
|
||||||
*/
|
*/
|
||||||
|
@objc
|
||||||
public static func dictionaryForTerms(_ terms: [CSSelectTerm]) -> CSSelect {
|
public static func dictionaryForTerms(_ terms: [CSSelectTerm]) -> CSSelect {
|
||||||
|
|
||||||
return self.init(Select<NSDictionary>(terms.map { $0.bridgeToSwift }))
|
return self.init(Select<NSDictionary>(terms.map { $0.bridgeToSwift }))
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ public final class CoreStoreSchema: DynamicSchema {
|
|||||||
case let attribute as AttributeProtocol:
|
case let attribute as AttributeProtocol:
|
||||||
let description = NSAttributeDescription()
|
let description = NSAttributeDescription()
|
||||||
description.name = attribute.keyPath
|
description.name = attribute.keyPath
|
||||||
description.attributeType = type(of: attribute).attributeType
|
description.attributeType = Swift.type(of: attribute).attributeType
|
||||||
description.isOptional = attribute.isOptional
|
description.isOptional = attribute.isOptional
|
||||||
description.isIndexed = attribute.isIndexed
|
description.isIndexed = attribute.isIndexed
|
||||||
description.defaultValue = attribute.defaultValue
|
description.defaultValue = attribute.defaultValue
|
||||||
|
|||||||
@@ -647,8 +647,9 @@ public extension DataStack {
|
|||||||
let mappingProviders = storage.migrationMappingProviders
|
let mappingProviders = storage.migrationMappingProviders
|
||||||
do {
|
do {
|
||||||
|
|
||||||
try withExtendedLifetime((sourceSchema.rawModel(), destinationSchema.rawModel())) { (sourceModel, destinationModel) in
|
try withExtendedLifetime((sourceSchema.rawModel(), destinationSchema.rawModel())) {
|
||||||
|
|
||||||
|
let (sourceModel, destinationModel) = $0
|
||||||
let mapping = try mappingProviders.findMapping(
|
let mapping = try mappingProviders.findMapping(
|
||||||
sourceSchema: sourceSchema,
|
sourceSchema: sourceSchema,
|
||||||
destinationSchema: destinationSchema,
|
destinationSchema: destinationSchema,
|
||||||
|
|||||||
@@ -117,8 +117,9 @@ public struct MigrationChain: ExpressibleByNilLiteral, ExpressibleByStringLitera
|
|||||||
|
|
||||||
var isValid = true
|
var isValid = true
|
||||||
var versionTree = [String: String]()
|
var versionTree = [String: String]()
|
||||||
elements.forEach { (sourceVersion, destinationVersion) in
|
elements.forEach {
|
||||||
|
|
||||||
|
let (sourceVersion, destinationVersion) = $0
|
||||||
guard let _ = versionTree.updateValue(destinationVersion, forKey: sourceVersion) else {
|
guard let _ = versionTree.updateValue(destinationVersion, forKey: sourceVersion) else {
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -130,8 +131,8 @@ public struct MigrationChain: ExpressibleByNilLiteral, ExpressibleByStringLitera
|
|||||||
}
|
}
|
||||||
let leafVersions = Set(
|
let leafVersions = Set(
|
||||||
elements
|
elements
|
||||||
.filter { versionTree[$1] == nil }
|
.filter { versionTree[$0.1] == nil }
|
||||||
.map { $1 }
|
.map { $0.1 }
|
||||||
)
|
)
|
||||||
|
|
||||||
let isVersionAmbiguous = { (start: String) -> Bool in
|
let isVersionAmbiguous = { (start: String) -> Bool in
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ internal extension NSManagedObjectContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@nonobjc
|
@nonobjc
|
||||||
internal func saveAsynchronouslyWithCompletion(_ completion: @escaping (_ hasChanges: Bool, _ error: CoreStoreError?) -> Void = { _ in }) {
|
internal func saveAsynchronouslyWithCompletion(_ completion: @escaping (_ hasChanges: Bool, _ error: CoreStoreError?) -> Void = { (_, _) in }) {
|
||||||
|
|
||||||
self.perform {
|
self.perform {
|
||||||
|
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ extension NSData: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSData
|
public typealias QueryableNativeType = NSData
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .binaryDataAttributeType
|
return .binaryDataAttributeType
|
||||||
@@ -372,6 +373,7 @@ extension NSDate: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSDate
|
public typealias QueryableNativeType = NSDate
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .dateAttributeType
|
return .dateAttributeType
|
||||||
@@ -413,6 +415,7 @@ extension NSManagedObjectID: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSManagedObjectID
|
public typealias QueryableNativeType = NSManagedObjectID
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .objectIDAttributeType
|
return .objectIDAttributeType
|
||||||
@@ -443,6 +446,7 @@ extension NSNull: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSNull
|
public typealias QueryableNativeType = NSNull
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .undefinedAttributeType
|
return .undefinedAttributeType
|
||||||
@@ -473,6 +477,7 @@ extension NSNumber: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSNumber
|
public typealias QueryableNativeType = NSNumber
|
||||||
|
|
||||||
|
@objc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .integer64AttributeType
|
return .integer64AttributeType
|
||||||
@@ -503,6 +508,7 @@ extension NSString: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSString
|
public typealias QueryableNativeType = NSString
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .stringAttributeType
|
return .stringAttributeType
|
||||||
@@ -533,6 +539,7 @@ extension NSURL: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSString
|
public typealias QueryableNativeType = NSString
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .stringAttributeType
|
return .stringAttributeType
|
||||||
@@ -558,6 +565,7 @@ extension NSUUID: QueryableAttributeType {
|
|||||||
|
|
||||||
public typealias QueryableNativeType = NSString
|
public typealias QueryableNativeType = NSString
|
||||||
|
|
||||||
|
@nonobjc
|
||||||
public class var cs_rawAttributeType: NSAttributeType {
|
public class var cs_rawAttributeType: NSAttributeType {
|
||||||
|
|
||||||
return .stringAttributeType
|
return .stringAttributeType
|
||||||
|
|||||||
Reference in New Issue
Block a user