Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(coderd/database/queries): remove trailing whitespace#20192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 1 commit intomainfrommafredri/fix-queries-whitespace
Oct 7, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletionscoderd/database/queries.sql.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

2 changes: 1 addition & 1 deletioncoderd/database/queries/provisionerdaemons.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -113,7 +113,7 @@ WHERE
-- Filter by max age if provided
AND (
sqlc.narg('max_age_ms')::bigint IS NULL
OR pd.last_seen_at IS NULL
OR pd.last_seen_at IS NULL
OR pd.last_seen_at >= (NOW() - (sqlc.narg('max_age_ms')::bigint || ' ms')::interval)
)
AND (
Expand Down
16 changes: 8 additions & 8 deletionscoderd/database/queries/provisionerjoblogs.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,19 +19,19 @@ SELECT
unnest(@level :: log_level [ ]) AS LEVEL,
unnest(@stage :: VARCHAR(128) [ ]) AS stage,
unnest(@output :: VARCHAR(1024) [ ]) AS output RETURNING *;

-- name: UpdateProvisionerJobLogsOverflowed :exec
UPDATE
UPDATE
provisioner_jobs
SET
SET
logs_overflowed = $2
WHERE
WHERE
id = $1;

-- name: UpdateProvisionerJobLogsLength :exec
UPDATE
UPDATE
provisioner_jobs
SET
SET
logs_length = logs_length + $2
WHERE
WHERE
id = $1;
6 changes: 3 additions & 3 deletionscoderd/database/queries/provisionerkeys.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,7 +34,7 @@ FROM
provisioner_keys
WHERE
organization_id = $1
AND
AND
lower(name) = lower(@name);

-- name: ListProvisionerKeysByOrganizationExcludeReserved :many
Expand All@@ -47,10 +47,10 @@ WHERE
AND
-- exclude reserved built-in key
id != '00000000-0000-0000-0000-000000000001'::uuid
AND
AND
-- exclude reserved user-auth key
id != '00000000-0000-0000-0000-000000000002'::uuid
AND
AND
-- exclude reserved psk key
id != '00000000-0000-0000-0000-000000000003'::uuid;

Expand Down
10 changes: 5 additions & 5 deletionscoderd/database/queries/testadmin.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,14 +6,14 @@ DO $$
DECLARE
table_record record;
BEGIN
FOR table_record IN
SELECT table_schema, table_name
FROM information_schema.tables
FOR table_record IN
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
AND table_type = 'BASE TABLE'
LOOP
EXECUTE format('ALTER TABLE %I.%I DISABLE TRIGGER ALL',
table_record.table_schema,
EXECUTE format('ALTER TABLE %I.%I DISABLE TRIGGER ALL',
table_record.table_schema,
table_record.table_name);
END LOOP;
END;
Expand Down
2 changes: 1 addition & 1 deletioncoderd/database/queries/workspaceagentstats.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -189,7 +189,7 @@ WITH agent_stats AS (
coalesce((PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY connection_median_latency_ms)), -1)::FLOAT AS workspace_connection_latency_95
FROM workspace_agent_stats
-- The greater than 0 is to support legacy agents that don't report connection_median_latency_ms.
WHERE workspace_agent_stats.created_at > $1 AND connection_median_latency_ms > 0
WHERE workspace_agent_stats.created_at > $1 AND connection_median_latency_ms > 0
GROUP BY user_id, agent_id, workspace_id, template_id
), latest_agent_stats AS (
SELECT
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp