Structure
SQLGroupExpression
A fundamental syntactical expression - an arbitrary expression or list of expressions, surroudned by parenthesis.
struct SQLGroupExpression
Overview
This construct provides “grouping” syntax in numerous contexts. When a “group” contains more than one subexpression, all subexpressions are joined using SQLList with the default separator. See init(_:separator:) for aadditional information.
Example usage:
try await database.select()
.column(...)
.where("foo", .in, SQLGroupExpression(SQLBind(foo), SQLBind(bar)))
...
// Generated SQL: `SELECT ... FROM .. WHERE "foo" IN ($0, $1)`.
Topics
Initializers
init(_:)Create a group expression with a single subexpresion.
Instance Properties
expressionsThe potentially empty list of expressions to group.
Instance Methods
serialize(to:)Invoked when a request is made to serialize the expression to raw SQL.
Relationships
Conforms To
SQLExpressionSwift.SendableSwift.SendableMetatype
See Also
Syntactic Expressions
SQLBinaryExpressionA fundamental syntactical expression - a left and right operand joined by an infix operator.SQLBinaryOperatorSQL binary expression operators.SQLBindA parameterizied value bound to the SQL query.SQLFunctionA call to a function available in SQL, expressed as a name and a (possibly empty) list of arguments.SQLIdentifierA fundamental syntactical expression - a quoted identifier (also often referred to as a “name” or “object name”).SQLListA fundamental syntactical expression - a list of subexpresions with a specified “separator” subexpression.SQLLiteralA fundamental syntactical expression - one of several various kinds of literal SQL expressions.SQLRawA fundamental syntactical expression - an arbitrary string of raw SQL with no escaping or formating of any kind.