chore: rename "InsertOrUpdate" to Upsert around the codebase (#6823)

* chore: rename "InsertOrUpdate" to Upsert around the codebase

The shorter name uses up less line width, is easier to read
and is used more often.

* make gen
This commit is contained in:
Ammar Bandukwala
2023-03-27 19:55:10 -05:00
committed by GitHub
parent f88f273cd6
commit 42b3d90221
10 changed files with 33 additions and 33 deletions

View File

@ -228,11 +228,11 @@ func (q *querier) UpdateWorkspaceBuildCostByID(ctx context.Context, arg database
return q.db.UpdateWorkspaceBuildCostByID(ctx, arg)
}
func (q *querier) InsertOrUpdateLastUpdateCheck(ctx context.Context, value string) error {
func (q *querier) UpsertLastUpdateCheck(ctx context.Context, value string) error {
if err := q.authorizeContext(ctx, rbac.ActionUpdate, rbac.ResourceSystem); err != nil {
return err
}
return q.db.InsertOrUpdateLastUpdateCheck(ctx, value)
return q.db.UpsertLastUpdateCheck(ctx, value)
}
func (q *querier) GetLastUpdateCheck(ctx context.Context) (string, error) {