mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Create CTE without request
This commit is contained in:
1 parent
2c42d0129c
commit
3a38cbe87f
2 files changed
+64
-4
No files matched your search
@@ -5,6 +5,35 @@ public struct CommonTableExpression<RowDecoder> {
|
||||
var request: _FetchRequest
|
||||
}
|
||||
|
||||
extension CommonTableExpression {
|
||||
#warning("TODO: doc")
|
||||
public init(
|
||||
tableName: String,
|
||||
columns: [Column]? = nil,
|
||||
sql: String,
|
||||
arguments: StatementArguments = StatementArguments(),
|
||||
type: RowDecoder.Type = RowDecoder.self)
|
||||
{
|
||||
self.init(
|
||||
tableName: tableName,
|
||||
columns: columns,
|
||||
request: SQLRequest<Void>(sql: sql, arguments: arguments))
|
||||
}
|
||||
|
||||
#warning("TODO: doc")
|
||||
public init(
|
||||
tableName: String,
|
||||
columns: [Column]? = nil,
|
||||
literal: SQLLiteral,
|
||||
type: RowDecoder.Type = RowDecoder.self)
|
||||
{
|
||||
self.init(
|
||||
tableName: tableName,
|
||||
columns: columns,
|
||||
request: SQLRequest<Void>(literal: literal))
|
||||
}
|
||||
}
|
||||
|
||||
extension CommonTableExpression {
|
||||
var relationForAll: SQLRelation {
|
||||
SQLRelation(
|
||||
|
||||
Reference in new issue
Block a user