Query(filter:sort:animation:)
Fetches a sorted subset of the attached model type that satisfy the specified predicate.
Declaration
@attached(accessor) @attached(peer, names: prefixed(`_`)) macro Query<Element>(filter: Predicate<Element>? = nil, sort descriptors: [SortDescriptor<Element>] = [], animation: Animation) where Element : PersistentModelParameters
- filter:
The logical condition the query uses to determine if it returns a specific model instance.
- descriptors:
An array of sort descriptors to use when arranging the fetched models.
- animation:
The animation to use when updates to the fetched models trigger user interface changes.