Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,9 @@ func (c *Client[TTx]) InsertTx(ctx context.Context, tx TTx, args JobArgs, opts *
return nil, err
}

return dbsqlc.JobRowFromInternal(res.Job), nil
jobRow := dbsqlc.JobRowFromInternal(res.Job)
jobRow.UniqueSkippedAsDuplicate = res.UniqueSkippedAsDuplicate
return jobRow, nil
}

// InsertManyParams encapsulates a single job combined with insert options for
Expand Down
5 changes: 5 additions & 0 deletions rivertype/job_row.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ type JobRow struct {
// functional behavior and are meant entirely as a user-specified construct
// to help group and categorize jobs.
Tags []string

// UniqueSkippedAsDuplicate indicates that the insert didn't occur because
// it was a unique job, and another unique job within the unique parameters
// was already in the database.
UniqueSkippedAsDuplicate bool
}

// JobState is the state of a job. Jobs start as `available` or `scheduled`, and
Expand Down