OrderBy

public struct OrderBy<O> : OrderByClause, FetchClause, QueryClause, DeleteClause, Hashable where O : DynamicObject
extension OrderBy: CustomDebugStringConvertible, CoreStoreDebugStringConvertible

The OrderBy clause specifies the sort order for results for a fetch or a query.

  • Combines two OrderBy sort descriptors together

    Declaration

    Swift

    public static func + (left: OrderBy, right: OrderBy) -> OrderBy
  • Combines two OrderBy sort descriptors together and stores the result to the left operand

    Declaration

    Swift

    public static func += (left: inout OrderBy, right: OrderBy)
  • Initializes a OrderBy clause with an empty list of sort descriptors

    Declaration

    Swift

    public init()
  • Initializes a OrderBy clause with a single sort descriptor

    Declaration

    Swift

    public init(_ sortDescriptor: NSSortDescriptor)

    Parameters

    sortDescriptor

    a NSSortDescriptor

  • Initializes a OrderBy clause with a list of sort descriptors

    Declaration

    Swift

    public init(_ sortDescriptors: [NSSortDescriptor])

    Parameters

    sortDescriptors

    a series of NSSortDescriptors

  • Initializes a OrderBy clause with a series of SortKeys

    Declaration

    Swift

    public init(_ sortKeys: [SortKey])

    Parameters

    sortKey

    a series of SortKeys

  • Initializes a OrderBy clause with a series of SortKeys

    Declaration

    Swift

    public init(_ sortKey: SortKey, _ sortKeys: SortKey...)

    Parameters

    sortKey

    a single SortKey

    sortKeys

    a series of SortKeys

OrderByClause

  • Declaration

    Swift

    public typealias ObjectType = O
  • Declaration

    Swift

    public let sortDescriptors: [NSSortDescriptor]

Equatable

  • Declaration

    Swift

    public static func == (lhs: OrderBy, rhs: OrderBy) -> Bool

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

SortKey

  • The SortKey is passed to the OrderBy clause to indicate the sort keys and their sort direction.

    See more

    Declaration

    Swift

    public struct SortKey

CustomDebugStringConvertible

  • Declaration

    Swift

    public var debugDescription: String { get }