SortDescriptor

A SortDescriptor stores a property name 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.

  • Returns a human-readable description of the sort descriptor.

    Declaration

    Swift

    public var description: String
  • Creates a SortDescriptor from a UnicodeScalarLiteralType.

    Declaration

    Swift

    public init(unicodeScalarLiteral value: UnicodeScalarLiteralType)

    Parameters

    unicodeScalarLiteral

    Property name literal.

  • Creates a SortDescriptor from an ExtendedGraphemeClusterLiteralType.

    Declaration

    Swift

    public init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType)

    Parameters

    extendedGraphemeClusterLiteral

    Property name literal.

  • Creates a SortDescriptor from a StringLiteralType.

    Declaration

    Swift

    public init(stringLiteral value: StringLiteralType)

    Parameters

    stringLiteral

    Property name literal.