mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
This PR is the coder/coder part of [the open_in parameter issue](https://github.com/coder/terraform-provider-coder/issues/297) aiming to add a new optional parameter to choose how to open modules. This PR is heavily linked [to this PR](https://github.com/coder/terraform-provider-coder/pull/321). ℹ️ For now, some integrations tests can not be pushed as it requires a release on the terraform-provider repo.
45 lines
1.1 KiB
SQL
45 lines
1.1 KiB
SQL
-- name: GetWorkspaceAppsByAgentID :many
|
|
SELECT * FROM workspace_apps WHERE agent_id = $1 ORDER BY slug ASC;
|
|
|
|
-- name: GetWorkspaceAppsByAgentIDs :many
|
|
SELECT * FROM workspace_apps WHERE agent_id = ANY(@ids :: uuid [ ]) ORDER BY slug ASC;
|
|
|
|
-- name: GetWorkspaceAppByAgentIDAndSlug :one
|
|
SELECT * FROM workspace_apps WHERE agent_id = $1 AND slug = $2;
|
|
|
|
-- name: GetWorkspaceAppsCreatedAfter :many
|
|
SELECT * FROM workspace_apps WHERE created_at > $1 ORDER BY slug ASC;
|
|
|
|
-- name: InsertWorkspaceApp :one
|
|
INSERT INTO
|
|
workspace_apps (
|
|
id,
|
|
created_at,
|
|
agent_id,
|
|
slug,
|
|
display_name,
|
|
icon,
|
|
command,
|
|
url,
|
|
external,
|
|
subdomain,
|
|
sharing_level,
|
|
healthcheck_url,
|
|
healthcheck_interval,
|
|
healthcheck_threshold,
|
|
health,
|
|
display_order,
|
|
hidden,
|
|
open_in
|
|
)
|
|
VALUES
|
|
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING *;
|
|
|
|
-- name: UpdateWorkspaceAppHealthByID :exec
|
|
UPDATE
|
|
workspace_apps
|
|
SET
|
|
health = $2
|
|
WHERE
|
|
id = $1;
|