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

Method OnConflict

ent/node_create.go:365–370  ·  view source on GitHub ↗

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example: client.Node.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

363// }).
364// Exec(ctx)
365func (nc *NodeCreate) OnConflict(opts ...sql.ConflictOption) *NodeUpsertOne {
366 nc.conflict = opts
367 return &NodeUpsertOne{
368 create: nc,
369 }
370}
371
372// OnConflictColumns calls `OnConflict` and configures the columns
373// 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