fetch(_:)
Returns an array of typed models that match the criteria of the specified fetch descriptor.
Declaration
func fetch<T>(_ descriptor: FetchDescriptor<T>) throws -> [T] where T : PersistentModelParameters
- descriptor:
A fetch descriptor that provides the configuration for the fetch.
Return Value
The array of typed models that satisfy the criteria of the fetch descriptor. If no models match the criteria, the array is empty.