Skip to content

Instance Method

set(model:prefix:keyEncodingStrategy:nilEncodingStrategy:userInfo:)

Configure a new SQLQueryEncoder as specified, use it to transform the provided model into a series of key/value pairs, and add an assignment for each pair.
@discardableResult func set(model: some Encodable & Sendable, prefix: String? = nil, keyEncodingStrategy: SQLQueryEncoder.KeyEncodingStrategy = .useDefaultKeys, nilEncodingStrategy: SQLQueryEncoder.NilEncodingStrategy = .default, userInfo: [CodingUserInfoKey : any Sendable] = [:]) throws -> Self

Parameters

model

An Encodable value whose keys and values will form a series of column assignments.

prefix

See prefix.

keyEncodingStrategy

See keyEncodingStrategy.

nilEncodingStrategy

See nilEncodingStrategy.

userInfo

See userInfo.

Discussion

Column names are left unqualified.