mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Give CommonTableExpression a key, for joins
This commit is contained in:
1 parent
00a7eb53e8
commit
e1d3c1d7dc
7 files changed
+112
-40
No files matched your search
@@ -337,13 +337,8 @@ extension QueryInterfaceRequest {
|
||||
}
|
||||
|
||||
#warning("TODO: doc")
|
||||
public func with<T>(_ cte: QueryInterfaceRequest<T>, aliased alias: TableAlias) -> Self {
|
||||
map(\.query) { $0.mapInto(\.ctes) { $0[alias] = .query(cte.query) } }
|
||||
}
|
||||
|
||||
#warning("TODO: doc")
|
||||
public func with<T>(_ cte: SQLRequest<T>, aliased alias: TableAlias) -> Self {
|
||||
map(\.query) { $0.mapInto(\.ctes) { $0[alias] = .literal(cte.sqlLiteral) } }
|
||||
public func with(_ cte: CommonTableExpression) -> Self {
|
||||
map(\.query) { $0.with(\.ctes[cte.key], cte) }
|
||||
}
|
||||
|
||||
/// Creates a request bound to type RowDecoder.
|
||||
|
||||
Reference in new issue
Block a user