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

Commitc1a3010

Browse files
committed
Optimize AcquireNotificationMessages to drop a join
This has the unfortunate side-effect of not allowing the AcquireNotificationMessagesRow.Payload type to be overriden to []byte as it was previously, but it does not change the semanticsSigned-off-by: Danny Kopping <danny@coder.com>
1 parent703559c commitc1a3010

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

‎coderd/database/queries.sql.go

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries/notifications.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ WITH acquired AS (
7272
FORUPDATE OF nm
7373
SKIP LOCKED
7474
LIMITsqlc.arg('count'))
75-
RETURNINGid)
75+
RETURNING*)
7676
SELECT
7777
-- message
7878
nm.id,
@@ -82,8 +82,7 @@ SELECT
8282
-- template
8383
nt.title_template,
8484
nt.body_template
85-
FROM acquired
86-
JOIN notification_messages nmONacquired.id=nm.id
85+
FROM acquired nm
8786
JOIN notification_templates ntONnm.notification_template_id=nt.id;
8887

8988
-- name: BulkMarkNotificationMessagesFailed :execrows

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp