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

Method OnConflict

ent/task_create.go:339–344  ·  view source on GitHub ↗

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example: client.Task.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Overrid

(opts ...sql.ConflictOption)

Source from the content-addressed store, hash-verified

337// }).
338// Exec(ctx)
339func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne {
340 tc.conflict = opts
341 return &TaskUpsertOne{
342 create: tc,
343 }
344}
345
346// OnConflictColumns calls `OnConflict` and configures the columns
347// 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