mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
CTE associations
This commit is contained in:
1 parent
c776ee8d47
commit
b7b89c5fa9
7 files changed
+193
-16
No files matched your search
@@ -337,8 +337,17 @@ extension QueryInterfaceRequest {
|
||||
}
|
||||
|
||||
#warning("TODO: doc")
|
||||
public func with(_ cte: CommonTableExpression) -> Self {
|
||||
map(\.query) { $0.with(\.ctes[cte.tableName], cte.request) }
|
||||
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.
|
||||
|
||||
Reference in new issue
Block a user