Merge branch 'develop' into prototype/Swift_3_2

This commit is contained in:
John Rommel Estropia
2017-06-26 00:34:32 +09:00
2 changed files with 36 additions and 0 deletions

View File

@@ -172,3 +172,17 @@ public struct OrderBy: FetchClause, QueryClause, DeleteClause, Hashable {
return (self.sortDescriptors as NSArray).hashValue
}
}
// MARK: - Sequence where Element == OrderBy
public extension Sequence where Iterator.Element == OrderBy {
/**
Combines multiple `OrderBy` predicates together
*/
public func combined() -> OrderBy {
return OrderBy(self.flatMap({ $0.sortDescriptors }))
}
}