Skip to content

Commit bcf1cac

Browse files
committed
Format oauth2.sql
1 parent bc785a3 commit bcf1cac

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

coderd/database/queries.sql.go

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/oauth2.sql

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ INSERT INTO oauth2_provider_app_tokens (
111111
) RETURNING *;
112112

113113
-- name: GetOAuth2ProviderAppsByUserID :many
114-
SELECT COUNT(DISTINCT oauth2_provider_app_tokens.id) as token_count,
114+
SELECT
115+
COUNT(DISTINCT oauth2_provider_app_tokens.id) as token_count,
115116
sqlc.embed(oauth2_provider_apps)
116117
FROM oauth2_provider_app_tokens
117118
INNER JOIN oauth2_provider_app_secrets
@@ -120,12 +121,16 @@ FROM oauth2_provider_app_tokens
120121
ON oauth2_provider_apps.id = oauth2_provider_app_secrets.app_id
121122
INNER JOIN api_keys
122123
ON api_keys.id = oauth2_provider_app_tokens.api_key_id
123-
WHERE api_keys.user_id = $1
124-
GROUP BY oauth2_provider_apps.id;
124+
WHERE
125+
api_keys.user_id = $1
126+
GROUP BY
127+
oauth2_provider_apps.id;
125128

126129
-- name: DeleteOAuth2ProviderAppTokensByAppAndUserID :exec
127-
DELETE FROM oauth2_provider_app_tokens
128-
USING oauth2_provider_app_secrets, api_keys
130+
DELETE FROM
131+
oauth2_provider_app_tokens
132+
USING
133+
oauth2_provider_app_secrets, api_keys
129134
WHERE
130135
oauth2_provider_app_secrets.id = oauth2_provider_app_tokens.app_secret_id
131136
AND api_keys.id = oauth2_provider_app_tokens.api_key_id

0 commit comments

Comments
 (0)