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

Commit29a9e26

Browse files
committed
Format oauth2.sql
1 parent8368548 commit29a9e26

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 aboutcustomizing 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-
SELECTCOUNT(DISTINCToauth2_provider_app_tokens.id)as token_count,
114+
SELECT
115+
COUNT(DISTINCToauth2_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
ONoauth2_provider_apps.id=oauth2_provider_app_secrets.app_id
121122
INNER JOIN api_keys
122123
ONapi_keys.id=oauth2_provider_app_tokens.api_key_id
123-
WHEREapi_keys.user_id= $1
124-
GROUP BYoauth2_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-
DELETEFROM oauth2_provider_app_tokens
128-
USING oauth2_provider_app_secrets, api_keys
130+
DELETEFROM
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
ANDapi_keys.id=oauth2_provider_app_tokens.api_key_id

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp