Class
SQLConflictUpdateBuilder
A builder for specifying column updates and an optional predicate to be applied to rows that caused unique key conflicts during an
INSERT.final class SQLConflictUpdateBuilder
Topics
Initializers
init()Create a conflict update builder.
Instance Properties
var predicate: (any SQLExpression)?The predicate under construction.var values: [any SQLExpression]List of assignment pairs.
Instance Methods
func set(excludedContentOf: some Encodable & Sendable, prefix: String?, keyEncodingStrategy: SQLQueryEncoder.KeyEncodingStrategy, nilEncodingStrategy: SQLQueryEncoder.NilEncodingStrategy, userInfo: [CodingUserInfoKey : any Sendable]) throws -> SelfEncodes the givenEncodablevalue to a sequence of key-value pairs and adds an assignment for each pair which uses the values each column was given in the originalINSERTquery’sVALUESlist.func set(excludedContentOf: some Encodable & Sendable, with: SQLQueryEncoder) throws -> SelfEncodes the givenEncodablevalue to a sequence of key-value pairs and adds an assignment for each pair which uses the values each column was given in the originalINSERTquery’sVALUESlist. SeeSQLExcludedColumnandSQLQueryEncoder.func set(excludedValueOf:)Add an assignment of the given column, using the value the column was given in theINSERTquery’sVALUESlist.
Relationships
Conforms To
See Also
Query Builders
class SQLAlterEnumBuilderBuildsSQLAlterEnumqueries.class SQLAlterTableBuilderBuildsSQLAlterTablequeries.class SQLCreateEnumBuilderBuildsSQLCreateEnumqueries.class SQLCreateIndexBuilderBuildsSQLCreateIndexqueries.class SQLCreateTableBuilderBuildsSQLCreateTablequeries.class SQLCreateTriggerBuilderBuildsSQLCreateTriggerqueries.class SQLDeleteBuilderBuildsSQLDeletequeries.class SQLDropEnumBuilderBuildsSQLDropEnumqueries.class SQLDropIndexBuilderBuildsSQLDropIndexqueries.class SQLDropTableBuilderBuildsSQLDropTablequeries.class SQLDropTriggerBuilderBuildsSQLDropTriggerqueries.class SQLInsertBuilderBuildsSQLInsertqueries.class SQLPredicateGroupBuilderNestedSQLPredicateBuilderfor building expression groups.class SQLRawBuilderBuilds raw SQL queries.class SQLReturningResultBuilderA builder returned from the methods ofSQLReturningBuilder; this builder wraps the original builder with one which providesSQLQueryFetcherconformance. As such, thereturning(_:)methods must always be the last ones in any call chain.