@frozen
public struct SortDescriptor
extension SortDescriptor: CustomStringConvertible
extension SortDescriptor: Equatable
extension SortDescriptor: ExpressibleByStringLiteral
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.
DeclarationSwift
public let keyPath: String
Whether this descriptor sorts in ascending or descending order.
DeclarationSwift
public let ascending: Bool
Creates a sort descriptor with the given key path and sort order values.
DeclarationSwift
public init(keyPath: String, ascending: Bool = true)
Parameters keyPath
The key path which the sort descriptor orders results by.
ascending
Whether the descriptor sorts in ascending or descending order.
Creates a sort descriptor with the given key path and sort order values.
DeclarationSwift
public init<Element>(keyPath: PartialKeyPath<Element>, ascending: Bool = true) where Element : RLMObjectBase
Parameters keyPath
The key path which the sort descriptor orders results by.
ascending
Whether the descriptor sorts in ascending or descending order.
Returns a copy of the sort descriptor with the sort order reversed.
DeclarationSwift
public func reversed() -> SortDescriptor
A human-readable description of the sort descriptor.
DeclarationSwift
public var description: String { get }
Returns whether the two sort descriptors are equal.
DeclarationSwift
public static func == (lhs: SortDescriptor, rhs: SortDescriptor) -> Bool
Swift
public typealias UnicodeScalarLiteralType = StringLiteralType
Swift
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
Creates a SortDescriptor
out of a string literal.
Swift
public init(stringLiteral value: StringLiteralType)
Parameters stringLiteral
Property name literal.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4