mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-07-09 06:15:13 +02:00
declare operators as static functions
This commit is contained in:
@@ -27,17 +27,6 @@ import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
public func + (left: OrderBy, right: OrderBy) -> OrderBy {
|
||||
|
||||
return OrderBy(left.sortDescriptors + right.sortDescriptors)
|
||||
}
|
||||
|
||||
public func += (left: inout OrderBy, right: OrderBy) {
|
||||
|
||||
left = left + right
|
||||
}
|
||||
|
||||
|
||||
// MARK: - KeyPath
|
||||
|
||||
public typealias KeyPath = String
|
||||
@@ -69,6 +58,22 @@ public enum SortKey {
|
||||
*/
|
||||
public struct OrderBy: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
|
||||
/**
|
||||
Combines two `OrderBy` sort descriptors together
|
||||
*/
|
||||
public static func + (left: OrderBy, right: OrderBy) -> OrderBy {
|
||||
|
||||
return OrderBy(left.sortDescriptors + right.sortDescriptors)
|
||||
}
|
||||
|
||||
/**
|
||||
Combines two `OrderBy` sort descriptors together and stores the result to the left operand
|
||||
*/
|
||||
public static func += (left: inout OrderBy, right: OrderBy) {
|
||||
|
||||
left = left + right
|
||||
}
|
||||
|
||||
/**
|
||||
The list of sort descriptors
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user