SortDescriptor
A SortDescriptor
stores a key path and a sort order for use with sorted(sortDescriptors:)
. It is similar to
NSSortDescriptor
, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.
-
The key path which the sort descriptor orders results by.
-
Whether this descriptor sorts in ascending or descending order.
-
Creates a sort descriptor with the given key path and sort order values.
-
Returns a copy of the sort descriptor with the sort order reversed.
-
A human-readable description of the sort descriptor.
-
Returns whether the two sort descriptors are equal.
-
-
-
Creates a
SortDescriptor
out of a string literal.