mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
chore: split queries.sql into files by table (#762)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
-- name: GetWorkspaceResourceByID :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
workspace_resources
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: GetWorkspaceResourcesByJobID :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
workspace_resources
|
||||
WHERE
|
||||
job_id = $1;
|
||||
|
||||
-- name: InsertWorkspaceResource :one
|
||||
INSERT INTO
|
||||
workspace_resources (
|
||||
id,
|
||||
created_at,
|
||||
job_id,
|
||||
transition,
|
||||
address,
|
||||
type,
|
||||
name,
|
||||
agent_id
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *;
|
||||
Reference in New Issue
Block a user