mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Revert "CommonTableExpression.contains(_:)"
This reverts commit f94cecb329.
We can't expose a raw table name like that, because it may be used several times, and need an alias.
This commit is contained in:
1 parent
f94cecb329
commit
992f2a2d83
3 files changed
-38
No files matched your search
@@ -145,19 +145,6 @@ extension CommonTableExpression {
|
||||
public func all() -> QueryInterfaceRequest<RowDecoder> {
|
||||
QueryInterfaceRequest(relation: relationForAll)
|
||||
}
|
||||
|
||||
/// An SQL expression that checks the inclusion of an expression in a
|
||||
/// common table expression.
|
||||
///
|
||||
/// let playerNameCTE = CommonTableExpression<Void>(
|
||||
/// named: "playerName",
|
||||
/// request: Player.select(Column("name"))
|
||||
///
|
||||
/// // name IN playerName
|
||||
/// playerNameCTE.contains(Column("name"))
|
||||
public func contains(_ element: SQLExpressible) -> SQLExpression {
|
||||
SQLLiteral("\(element.sqlExpression) IN \(sql: tableName.quotedDatabaseIdentifier)").sqlExpression
|
||||
}
|
||||
}
|
||||
|
||||
/// A low-level common table expression
|
||||
|
||||
Reference in new issue
Block a user