Gather CTE methods

This commit is contained in:
Gwendal Roué committed 2020-12-01 19:29:39 +01:00
1 parent 9896607dff
commit 8000332ec4
2 files changed
+18 -14

No files matched your search

@@ -75,6 +75,24 @@ extension _FetchRequest {
}
}
// MARK: - QueryInterfaceRequest
extension QueryInterfaceRequest {
#warning("TODO: doc")
public func with(_ ctes: CommonTableExpression...) -> Self {
with(ctes)
}
#warning("TODO: doc")
public func with(_ ctes: [CommonTableExpression]) -> Self {
mapInto(\.query.ctes) {
for cte in ctes {
$0[cte.tableName] = cte.request
}
}
}
}
// MARK: - _AllCTEColumns
/// :nodoc:
@@ -336,20 +336,6 @@ extension QueryInterfaceRequest {
map(\.query) { $0.limit(limit, offset: offset) }
}
#warning("TODO: doc")
public func with(_ ctes: CommonTableExpression...) -> Self {
with(ctes)
}
#warning("TODO: doc")
public func with(_ ctes: [CommonTableExpression]) -> Self {
mapInto(\.query.ctes) {
for cte in ctes {
$0[cte.tableName] = cte.request
}
}
}
/// Creates a request bound to type RowDecoder.
///
/// The returned request can fetch if the type RowDecoder is fetchable (Row,