Skip to content

Commit 5a662d0

Browse files
committed
Format oauth2.sql
1 parent 8368548 commit 5a662d0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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
127+
BY 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy