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)
| 337 | // }). |
| 338 | // Exec(ctx) |
| 339 | func (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: |
nothing calls this directly
no outgoing calls
no test coverage detected