Contents

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 : PersistentModel

Parameters

  • 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.

See Also

Fetching models