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.

Properties

  • The key path which the sort descriptor orders results by.

  • Whether this descriptor sorts in ascending or descending order.

Initializers

Functions

  • Returns a copy of the sort descriptor with the sort order reversed.

CustomStringConvertible

  • A human-readable description of the sort descriptor.

Equatable

  • Returns whether the two sort descriptors are equal.

StringLiteralConvertible