Skip to content

Commit

Permalink
InsertManyFast doc fixes for uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
bgentry committed Sep 23, 2024
1 parent 18bcb34 commit 3b71780
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1508,9 +1508,9 @@ func (c *Client[TTx]) insertManyParams(params []InsertManyParams) ([]*riverdrive
// // handle error
// }
//
// Job uniqueness is not respected when using InsertMany due to unique inserts
// using an internal transaction and advisory lock that might lead to
// significant lock contention. Insert unique jobs using Insert instead.
// Job uniqueness is supported using this path, but unlike `InsertMany` they
// cannot be handled gracefully. If a unique constraint is violated, the
// operation will fail and no jobs will be inserted.
func (c *Client[TTx]) InsertManyFast(ctx context.Context, params []InsertManyParams) (int, error) {
if !c.driver.HasPool() {
return 0, errNoDriverDBPool
Expand Down Expand Up @@ -1554,9 +1554,9 @@ func (c *Client[TTx]) InsertManyFast(ctx context.Context, params []InsertManyPar
// // handle error
// }
//
// Job uniqueness is not respected when using InsertManyTx due to unique inserts
// using an internal transaction and advisory lock that might lead to
// significant lock contention. Insert unique jobs using InsertTx instead.
// Job uniqueness is supported using this path, but unlike `InsertManyTx` they
// cannot be handled gracefully. If a unique constraint is violated, the
// operation will fail and no jobs will be inserted.
//
// This variant lets a caller insert jobs atomically alongside other database
// changes. An inserted job isn't visible to be worked until the transaction
Expand Down

0 comments on commit 3b71780

Please sign in to comment.