SQLSubqueryable
The protocol for types that can be embedded as a subquery.
-
sqlExpressionExtension 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()
View on GitHub
Install in Dash
SQLSubqueryable Protocol Reference