SQLSubqueryable
The protocol for types that can be embedded as a subquery.
-
sqlExpression
Extension methodReturns a subquery expression.
-
contains(_:
Extension method) Returns an expression that checks the inclusion of the expression in the subquery.
// 1000 IN (SELECT score FROM player) let request = Player.select(Column("score"), as: Int.self) let condition = request.contains(1000)
-
exists()
Extension methodReturns an expression that is true if and only if the subquery would return one or more rows.
// EXISTS (SELECT * FROM player WHERE name = 'Arthur') let request = Player.filter(Column("name") == "Arthur") let condition = request.exists()