WIP: docs

This commit is contained in:
John Estropia
2019-10-19 09:34:31 +09:00
parent 0b18366ab1
commit 326b897b06
10 changed files with 354 additions and 125 deletions

View File

@@ -154,6 +154,24 @@ public /*abstract*/ class BaseDataTransaction {
)
return self.fetchExisting(objectID)
}
/**
Deletes the objects with the specified `NSManagedObjectID`s.
- parameter objectIDs: the `NSManagedObjectID`s of the objects to delete
*/
public func delete<S: Sequence>(objectIDs: S) where S.Iterator.Element: NSManagedObjectID {
Internals.assert(
self.isRunningInAllowedQueue(),
"Attempted to delete an entity outside its designated queue."
)
let context = self.context
objectIDs.forEach {
context.fetchExisting($0).map(context.delete(_:))
}
}
/**
Deletes the specified `NSManagedObject`s or `CoreStoreObject`s represented by series of `ObjectRepresentation`s.