This commit is contained in:
John Estropia
2026-07-15 11:50:43 +09:00
parent 7db1cfecfb
commit 890e150b95
135 changed files with 2895 additions and 2526 deletions
@@ -110,6 +110,19 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
return self.context.fetchExisting(object)
}
/**
Fetches the `DynamicObject` instance in the transaction's context from an `NSManagedObjectID`.
- parameter persistentID: the `DynamicObjectID` for the object
- returns: the `DynamicObject` instance if the object exists in the transaction, or `nil` if not found.
*/
public func fetchExisting<O: DynamicObject>(
_ persistentID: DynamicObjectID<O>
) -> O? {
return self.context.fetchExisting(persistentID.managedObjectID)
}
/**
Fetches the `DynamicObject` instance in the transaction's context from an `NSManagedObjectID`.
@@ -136,6 +149,19 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
return self.context.fetchExisting(objects)
}
/**
Fetches the `DynamicObject` instances in the transaction's context from a list of `DynamicObjectID`.
- parameter objectIDs: the `DynamicObjectID` array for the objects
- returns: the `DynamicObject` array for objects that exists in the transaction
*/
public func fetchExisting<O: DynamicObject, S: Sequence>(
_ objectIDs: S
) -> [O] where S.Iterator.Element == DynamicObjectID<O> {
return self.context.fetchExisting(objectIDs)
}
/**
Fetches the `DynamicObject` instances in the transaction's context from a list of `NSManagedObjectID`.