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

@ -10,21 +10,21 @@ INSERT INTO site_configs (key, value) VALUES ('derp_mesh_key', $1);
-- name: GetDERPMeshKey :one
SELECT value FROM site_configs WHERE key = 'derp_mesh_key';
-- name: InsertOrUpdateLastUpdateCheck :exec
-- name: UpsertLastUpdateCheck :exec
INSERT INTO site_configs (key, value) VALUES ('last_update_check', $1)
ON CONFLICT (key) DO UPDATE SET value = $1 WHERE site_configs.key = 'last_update_check';
-- name: GetLastUpdateCheck :one
SELECT value FROM site_configs WHERE key = 'last_update_check';
-- name: InsertOrUpdateServiceBanner :exec
-- name: UpsertServiceBanner :exec
INSERT INTO site_configs (key, value) VALUES ('service_banner', $1)
ON CONFLICT (key) DO UPDATE SET value = $1 WHERE site_configs.key = 'service_banner';
-- name: GetServiceBanner :one
SELECT value FROM site_configs WHERE key = 'service_banner';
-- name: InsertOrUpdateLogoURL :exec
-- name: UpsertLogoURL :exec
INSERT INTO site_configs (key, value) VALUES ('logo_url', $1)
ON CONFLICT (key) DO UPDATE SET value = $1 WHERE site_configs.key = 'logo_url';