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:
Gwendal Roué committed 2020-12-08 18:36:51 +01:00
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