diff --git a/Sources/ZeeQL/Control/FetchSpecification+Builder.swift b/Sources/ZeeQL/Control/FetchSpecification+Builder.swift index 8e1b477..6a49fbf 100644 --- a/Sources/ZeeQL/Control/FetchSpecification+Builder.swift +++ b/Sources/ZeeQL/Control/FetchSpecification+Builder.swift @@ -159,17 +159,6 @@ public extension DatabaseFetchSpecification `where`(key, .EqualTo, value) } - @inlinable - func order(by key: Swift.KeyPath>, - _ selector: SortOrdering.Selector = .CompareAscending) - -> Self - where V: AttributeValue - { - let attribute = Object.e[keyPath: key] - let so = SortOrdering(key: AttributeKey(attribute), selector: selector) - return order(by: so) - } - #if swift(>=5.9) @inlinable func order( @@ -186,5 +175,16 @@ public extension DatabaseFetchSpecification } return fs } + #else + @inlinable + func order(by key: Swift.KeyPath>, + _ selector: SortOrdering.Selector = .CompareAscending) + -> Self + where V: AttributeValue + { + let attribute = Object.e[keyPath: key] + let so = SortOrdering(key: AttributeKey(attribute), selector: selector) + return order(by: so) + } #endif // swift(>=5.9 }