WIP: prototype for ManagedObjectProtocol

This commit is contained in:
John Estropia
2017-04-05 21:56:19 +09:00
parent 258c237100
commit 8b77e4e5a0
44 changed files with 1244 additions and 823 deletions

View File

@@ -50,8 +50,7 @@ public extension BaseDataTransaction {
return try autoreleasepool {
let entityType = into.entityClass as! T.Type
let entityType = into.entityClass
guard entityType.shouldInsert(from: source, in: self) else {
return nil
@@ -111,7 +110,7 @@ public extension BaseDataTransaction {
return try sourceArray.flatMap { (source) -> T? in
let entityType = into.entityClass as! T.Type
let entityType = into.entityClass
guard entityType.shouldInsert(from: source, in: self) else {
return nil
@@ -145,7 +144,7 @@ public extension BaseDataTransaction {
return try autoreleasepool {
let entityType = into.entityClass as! T.Type
let entityType = into.entityClass
let uniqueIDKeyPath = entityType.uniqueIDKeyPath
guard let uniqueIDValue = try entityType.uniqueID(from: source, in: self) else {
@@ -198,7 +197,7 @@ public extension BaseDataTransaction {
return try autoreleasepool {
let entityType = into.entityClass as! T.Type
let entityType = into.entityClass
var importSourceByID = Dictionary<T.UniqueIDType, T.ImportSource>()
let sortedIDs = try autoreleasepool {