mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: split queries.sql into files by table (#762)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
-- name: DeleteParameterValueByID :exec
|
||||
DELETE FROM
|
||||
parameter_values
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: GetParameterValuesByScope :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
parameter_values
|
||||
WHERE
|
||||
scope = $1
|
||||
AND scope_id = $2;
|
||||
|
||||
-- name: GetParameterValueByScopeAndName :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
parameter_values
|
||||
WHERE
|
||||
scope = $1
|
||||
AND scope_id = $2
|
||||
AND NAME = $3
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- name: InsertParameterValue :one
|
||||
INSERT INTO
|
||||
parameter_values (
|
||||
id,
|
||||
"name",
|
||||
created_at,
|
||||
updated_at,
|
||||
scope,
|
||||
scope_id,
|
||||
source_scheme,
|
||||
source_value,
|
||||
destination_scheme
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING *;
|
||||
Reference in New Issue
Block a user