@@ -27,111 +27,111 @@ public extension QueryBuilder {
2727 order ( by: sortDescriptors)
2828 }
2929
30- func order< V> ( _ direction: SortDirection = . ascending, by keyPath: KeyPath < M , V > ) -> QueryBuilder < M , R > {
31- let sortDescriptor = NSSortDescriptor ( keyPath : keyPath, ascending: direction. isAscending)
30+ func order< V: Expression > ( _ direction: SortDirection = . ascending, by keyPath: KeyPath < Object < M > , V > ) -> QueryBuilder < M , R > {
31+ let sortDescriptor = NSSortDescriptor ( objectKeyPath : keyPath, ascending: direction. isAscending)
3232 var query = self
3333 query. sortDescriptors. append ( sortDescriptor)
3434 return query
3535 }
3636
37- func order< V1, V2> (
37+ func order< V1: Expression , V2: Expression > (
3838 _ direction: SortDirection = . ascending,
39- by keyPath1: KeyPath < M , V1 > ,
40- _ keyPath2: KeyPath < M , V2 >
39+ by keyPath1: KeyPath < Object < M > , V1 > ,
40+ _ keyPath2: KeyPath < Object < M > , V2 >
4141 ) -> QueryBuilder < M , R > {
4242 let sortDescriptors = [
43- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
44- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
43+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
44+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
4545 ]
4646 return order ( by: sortDescriptors)
4747 }
4848
49- func order< V1, V2, V3> (
49+ func order< V1: Expression , V2: Expression , V3: Expression > (
5050 _ direction: SortDirection = . ascending,
51- by keyPath1: KeyPath < M , V1 > ,
52- _ keyPath2: KeyPath < M , V2 > ,
53- _ keyPath3: KeyPath < M , V3 >
51+ by keyPath1: KeyPath < Object < M > , V1 > ,
52+ _ keyPath2: KeyPath < Object < M > , V2 > ,
53+ _ keyPath3: KeyPath < Object < M > , V3 >
5454 ) -> QueryBuilder < M , R > {
5555 let sortDescriptors = [
56- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
57- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
58- NSSortDescriptor ( keyPath : keyPath3, ascending: direction. isAscending) ,
56+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
57+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
58+ NSSortDescriptor ( objectKeyPath : keyPath3, ascending: direction. isAscending) ,
5959 ]
6060 return order ( by: sortDescriptors)
6161 }
6262
63- func order< V1, V2, V3, V4> (
63+ func order< V1: Expression , V2: Expression , V3: Expression , V4: Expression > (
6464 _ direction: SortDirection = . ascending,
65- by keyPath1: KeyPath < M , V1 > ,
66- _ keyPath2: KeyPath < M , V2 > ,
67- _ keyPath3: KeyPath < M , V3 > ,
68- _ keyPath4: KeyPath < M , V4 >
65+ by keyPath1: KeyPath < Object < M > , V1 > ,
66+ _ keyPath2: KeyPath < Object < M > , V2 > ,
67+ _ keyPath3: KeyPath < Object < M > , V3 > ,
68+ _ keyPath4: KeyPath < Object < M > , V4 >
6969 ) -> QueryBuilder < M , R > {
7070 let sortDescriptors = [
71- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
72- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
73- NSSortDescriptor ( keyPath : keyPath3, ascending: direction. isAscending) ,
74- NSSortDescriptor ( keyPath : keyPath4, ascending: direction. isAscending) ,
71+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
72+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
73+ NSSortDescriptor ( objectKeyPath : keyPath3, ascending: direction. isAscending) ,
74+ NSSortDescriptor ( objectKeyPath : keyPath4, ascending: direction. isAscending) ,
7575 ]
7676 return order ( by: sortDescriptors)
7777 }
7878
79- func order< V1, V2, V3, V4, V5> (
79+ func order< V1: Expression , V2: Expression , V3: Expression , V4: Expression , V5: Expression > (
8080 _ direction: SortDirection = . ascending,
81- by keyPath1: KeyPath < M , V1 > ,
82- _ keyPath2: KeyPath < M , V2 > ,
83- _ keyPath3: KeyPath < M , V3 > ,
84- _ keyPath4: KeyPath < M , V4 > ,
85- _ keyPath5: KeyPath < M , V5 >
81+ by keyPath1: KeyPath < Object < M > , V1 > ,
82+ _ keyPath2: KeyPath < Object < M > , V2 > ,
83+ _ keyPath3: KeyPath < Object < M > , V3 > ,
84+ _ keyPath4: KeyPath < Object < M > , V4 > ,
85+ _ keyPath5: KeyPath < Object < M > , V5 >
8686 ) -> QueryBuilder < M , R > {
8787 let sortDescriptors = [
88- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
89- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
90- NSSortDescriptor ( keyPath : keyPath3, ascending: direction. isAscending) ,
91- NSSortDescriptor ( keyPath : keyPath4, ascending: direction. isAscending) ,
92- NSSortDescriptor ( keyPath : keyPath5, ascending: direction. isAscending) ,
88+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
89+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
90+ NSSortDescriptor ( objectKeyPath : keyPath3, ascending: direction. isAscending) ,
91+ NSSortDescriptor ( objectKeyPath : keyPath4, ascending: direction. isAscending) ,
92+ NSSortDescriptor ( objectKeyPath : keyPath5, ascending: direction. isAscending) ,
9393 ]
9494 return order ( by: sortDescriptors)
9595 }
9696
97- func order< V1, V2, V3, V4, V5, V6> (
97+ func order< V1: Expression , V2: Expression , V3: Expression , V4: Expression , V5: Expression , V6: Expression > (
9898 _ direction: SortDirection = . ascending,
99- by keyPath1: KeyPath < M , V1 > ,
100- _ keyPath2: KeyPath < M , V2 > ,
101- _ keyPath3: KeyPath < M , V3 > ,
102- _ keyPath4: KeyPath < M , V4 > ,
103- _ keyPath5: KeyPath < M , V5 > ,
104- _ keyPath6: KeyPath < M , V6 >
99+ by keyPath1: KeyPath < Object < M > , V1 > ,
100+ _ keyPath2: KeyPath < Object < M > , V2 > ,
101+ _ keyPath3: KeyPath < Object < M > , V3 > ,
102+ _ keyPath4: KeyPath < Object < M > , V4 > ,
103+ _ keyPath5: KeyPath < Object < M > , V5 > ,
104+ _ keyPath6: KeyPath < Object < M > , V6 >
105105 ) -> QueryBuilder < M , R > {
106106 let sortDescriptors = [
107- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
108- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
109- NSSortDescriptor ( keyPath : keyPath3, ascending: direction. isAscending) ,
110- NSSortDescriptor ( keyPath : keyPath4, ascending: direction. isAscending) ,
111- NSSortDescriptor ( keyPath : keyPath5, ascending: direction. isAscending) ,
112- NSSortDescriptor ( keyPath : keyPath6, ascending: direction. isAscending) ,
107+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
108+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
109+ NSSortDescriptor ( objectKeyPath : keyPath3, ascending: direction. isAscending) ,
110+ NSSortDescriptor ( objectKeyPath : keyPath4, ascending: direction. isAscending) ,
111+ NSSortDescriptor ( objectKeyPath : keyPath5, ascending: direction. isAscending) ,
112+ NSSortDescriptor ( objectKeyPath : keyPath6, ascending: direction. isAscending) ,
113113 ]
114114 return order ( by: sortDescriptors)
115115 }
116116
117- func order< V1, V2, V3, V4, V5, V6, V7> (
117+ func order< V1: Expression , V2: Expression , V3: Expression , V4: Expression , V5: Expression , V6: Expression , V7: Expression > (
118118 _ direction: SortDirection = . ascending,
119- by keyPath1: KeyPath < M , V1 > ,
120- _ keyPath2: KeyPath < M , V2 > ,
121- _ keyPath3: KeyPath < M , V3 > ,
122- _ keyPath4: KeyPath < M , V4 > ,
123- _ keyPath5: KeyPath < M , V5 > ,
124- _ keyPath6: KeyPath < M , V6 > ,
125- _ keyPath7: KeyPath < M , V7 >
119+ by keyPath1: KeyPath < Object < M > , V1 > ,
120+ _ keyPath2: KeyPath < Object < M > , V2 > ,
121+ _ keyPath3: KeyPath < Object < M > , V3 > ,
122+ _ keyPath4: KeyPath < Object < M > , V4 > ,
123+ _ keyPath5: KeyPath < Object < M > , V5 > ,
124+ _ keyPath6: KeyPath < Object < M > , V6 > ,
125+ _ keyPath7: KeyPath < Object < M > , V7 >
126126 ) -> QueryBuilder < M , R > {
127127 let sortDescriptors = [
128- NSSortDescriptor ( keyPath : keyPath1, ascending: direction. isAscending) ,
129- NSSortDescriptor ( keyPath : keyPath2, ascending: direction. isAscending) ,
130- NSSortDescriptor ( keyPath : keyPath3, ascending: direction. isAscending) ,
131- NSSortDescriptor ( keyPath : keyPath4, ascending: direction. isAscending) ,
132- NSSortDescriptor ( keyPath : keyPath5, ascending: direction. isAscending) ,
133- NSSortDescriptor ( keyPath : keyPath6, ascending: direction. isAscending) ,
134- NSSortDescriptor ( keyPath : keyPath7, ascending: direction. isAscending) ,
128+ NSSortDescriptor ( objectKeyPath : keyPath1, ascending: direction. isAscending) ,
129+ NSSortDescriptor ( objectKeyPath : keyPath2, ascending: direction. isAscending) ,
130+ NSSortDescriptor ( objectKeyPath : keyPath3, ascending: direction. isAscending) ,
131+ NSSortDescriptor ( objectKeyPath : keyPath4, ascending: direction. isAscending) ,
132+ NSSortDescriptor ( objectKeyPath : keyPath5, ascending: direction. isAscending) ,
133+ NSSortDescriptor ( objectKeyPath : keyPath6, ascending: direction. isAscending) ,
134+ NSSortDescriptor ( objectKeyPath : keyPath7, ascending: direction. isAscending) ,
135135 ]
136136 return order ( by: sortDescriptors)
137137 }
0 commit comments