Files
2026-09-22 22:51:19 +08:00

12 lines
293 B
SQL

-- name: GetAppConfig :one
SELECT * FROM app_config
WHERE config_key = ?;
-- name: UpsertAppConfig :one
INSERT INTO app_config (config_key, config_value)
VALUES (?, ?)
ON CONFLICT(config_key) DO UPDATE
SET config_value = excluded.config_value,
updated_at = CURRENT_TIMESTAMP
RETURNING *;