Structure
SQLStatement
An alternative API for serialization of
SQLExpressions.struct SQLStatement
Overview
The statement(_:) method provides access to the “statement” serialization API, which offers a more consistent and readable interface for serialization than the repeated calls to write(_:) and serialize(to:) originally described by SQLExpression. See the documentation of statement(_:) for example usage.
Note
Although SQLStatement itself conforms to SQLExpression, users are not expected to explicitly include it in the serialization of any other expression; it is serialized automatically by statement(_:) when appropriate.
Topics
Instance Properties
dialectConvenience accessor for the database’sSQLDialect.loggerConvenience accessor for the database’sLogger.partsThe individual expressions collected by the statement, in order.
Instance Methods
append(_:)Add an optional unserializedSQLExpressionof any kind to the output.append(_:_:)Add two optional unserializedSQLExpressions to the statement output.append(_:_:_:)Add three optional unserializedSQLExpressions to the statement output.serialize(to:)Invoked when a request is made to serialize the expression to raw SQL.
Relationships
Conforms To
SQLExpressionSwift.SendableSwift.SendableMetatype
See Also
Fundamentals
SQLExpressionThe fundamental base type of anything which can be represented as SQL using SQLKit.SQLSerializerEncapsulates the most basic operations for serializingSQLExpressions into a raw SQL string and a (potentially empty) sequence of bound parameter values.