MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / OnConflict

Method OnConflict

ent/setting_create.go:576–581  ·  view source on GitHub ↗

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example: client.Setting.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override

(opts ...sql.ConflictOption)

Source from the content-addressed store, hash-verified

574// }).
575// Exec(ctx)
576func (scb *SettingCreateBulk) OnConflict(opts ...sql.ConflictOption) *SettingUpsertBulk {
577 scb.conflict = opts
578 return &SettingUpsertBulk{
579 create: scb,
580 }
581}
582
583// OnConflictColumns calls `OnConflict` and configures the columns
584// as conflict target. Using this option is equivalent to using:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected