mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 17:09:42 +01:00
WIP: SaveResult bridge
This commit is contained in:
@@ -148,32 +148,6 @@ public struct Into<T: NSManagedObject>: Hashable {
|
||||
self.configuration = configuration
|
||||
self.inferStoreIfPossible = inferStoreIfPossible
|
||||
}
|
||||
|
||||
internal func upcast() -> Into<NSManagedObject> {
|
||||
|
||||
return Into<NSManagedObject>(
|
||||
entityClass: self.entityClass,
|
||||
configuration: self.configuration,
|
||||
inferStoreIfPossible: self.inferStoreIfPossible
|
||||
)
|
||||
}
|
||||
|
||||
internal func downCast<U: NSManagedObject>(type: U.Type) -> Into<U>? {
|
||||
|
||||
let entityClass: AnyClass = self.entityClass
|
||||
guard entityClass.isSubclassOfClass(U) else {
|
||||
|
||||
return nil
|
||||
}
|
||||
return Into<U>(
|
||||
entityClass: entityClass,
|
||||
configuration: self.configuration,
|
||||
inferStoreIfPossible: self.inferStoreIfPossible
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// MARK: Private
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user