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

Method OnConflict

ent/node_create.go:911–916  ·  view source on GitHub ↗

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

(opts ...sql.ConflictOption)

Source from the content-addressed store, hash-verified

909// }).
910// Exec(ctx)
911func (ncb *NodeCreateBulk) OnConflict(opts ...sql.ConflictOption) *NodeUpsertBulk {
912 ncb.conflict = opts
913 return &NodeUpsertBulk{
914 create: ncb,
915 }
916}
917
918// OnConflictColumns calls `OnConflict` and configures the columns
919// 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