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
var dialect: any SQLDialectConvenience accessor for the database’sSQLDialect.var logger: LoggerConvenience accessor for the database’sLogger.var parts: [any SQLExpression]The individual expressions collected by the statement, in order.
Instance Methods
func append(_:)Add an optional unserializedSQLExpressionof any kind to the output.func append(_:_:)Add two optional unserializedSQLExpressions to the statement output.func append(_:_:_:)Add three optional unserializedSQLExpressions to the statement output.func serialize(to: inout SQLSerializer)Invoked when a request is made to serialize the expression to raw SQL.
Relationships
Conforms To
SQLExpressionSwift.SendableSwift.SendableMetatype
See Also
Fundamentals
protocol SQLExpressionThe fundamental base type of anything which can be represented as SQL using SQLKit.struct SQLSerializerEncapsulates the most basic operations for serializingSQLExpressions into a raw SQL string and a (potentially empty) sequence of bound parameter values.