Structure
SQLSerializer
Encapsulates the most basic operations for serializing
SQLExpressions into a raw SQL string and a (potentially empty) sequence of bound parameter values.struct SQLSerializer
Topics
Initializers
init(database: any SQLDatabase)Create a newSQLSerializerfor a givenSQLDatabase.
Instance Properties
var binds: [any Encodable & Sendable]The list of bound parameter values (if any).let database: any SQLDatabaseThe database for this serializer.var dialect: any SQLDialectvar sql: StringThe generated raw SQL text.
Instance Methods
func statement((inout SQLStatement) -> ())Invoke the provided closure with a newSQLStatementto use for serialization.func write(String)Append raw SQL to the serializer.func write(bind: any Encodable & Sendable)Add a bound parameter value to the serializer.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype
See Also
Fundamentals
protocol SQLExpressionThe fundamental base type of anything which can be represented as SQL using SQLKit.struct SQLStatementAn alternative API for serialization ofSQLExpressions.