Skip to content

Instance Method

set(excludedContentOf:with:)

Encodes the given Encodable value to a sequence of key-value pairs and adds an assignment for each pair which uses the values each column was given in the original INSERT query’s VALUES list. See SQLExcludedColumn and SQLQueryEncoder.
@discardableResult func set(excludedContentOf model: some Encodable & Sendable, with encoder: SQLQueryEncoder) throws -> Self

Discussion

Important

The actual values stored in the provided model are not used by this method. The model is encoded, then the resulting values are discarded and the list of column names is used to repeatedly invoke set(excludedValueOf:). This is potentially very inefficient; a future version of the API will offer the ability to efficiently set the excluded values for all input columns in one operation.