Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): use insertOne insteadof insert/findOneOrFail combination #13908

Merged
merged 63 commits into from
Jun 1, 2024

Conversation

acid-chicken
Copy link
Member

@acid-chicken acid-chicken commented May 29, 2024

What

挿入後すぐデータが必要な場合に

INSERT INTO table VALUES (🤪);
SELECT 🤪 FROM table WHERE id = ?;

とせずに

WITH cte (🤪) AS (INSERT INTO table VALUES (🤪) RETURNING 🤪) SELECT 🤪 FROM cte table;

とする

Why

Related to #10897

Additional info (optional)

wip

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label May 29, 2024
@acid-chicken
Copy link
Member Author

/preview

@acid-chicken
Copy link
Member Author

/preview

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 76.76056% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 64.95%. Comparing base (030082f) to head (f096cb6).

Files Patch % Lines
packages/backend/src/models/_.ts 92.70% 10 Missing ⚠️
...ckages/backend/src/core/AvatarDecorationService.ts 0.00% 2 Missing ⚠️
packages/backend/src/core/ClipService.ts 0.00% 2 Missing ⚠️
packages/backend/src/core/CustomEmojiService.ts 0.00% 2 Missing ⚠️
packages/backend/src/core/ReversiService.ts 0.00% 2 Missing ⚠️
packages/backend/src/core/RoleService.ts 50.00% 2 Missing ⚠️
packages/backend/src/core/UserFollowingService.ts 0.00% 2 Missing ⚠️
...ckend/src/core/activitypub/models/ApNoteService.ts 0.00% 2 Missing ⚠️
...queue/processors/ImportAntennasProcessorService.ts 0.00% 2 Missing ⚠️
...ueue/processors/ImportUserListsProcessorService.ts 0.00% 2 Missing ⚠️
... and 20 more
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #13908       +/-   ##
============================================
- Coverage    77.84%   64.95%   -12.89%     
============================================
  Files          185      989      +804     
  Lines        25595   112848    +87253     
  Branches       487     5815     +5328     
============================================
+ Hits         19924    73306    +53382     
- Misses        5664    38100    +32436     
- Partials         7     1442     +1435     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented May 29, 2024

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

@acid-chicken acid-chicken marked this pull request as ready for review May 31, 2024 11:17
@syuilo syuilo merged commit 2b8056a into develop Jun 1, 2024
30 checks passed
@syuilo syuilo deleted the fix/insertone branch June 1, 2024 02:16
@syuilo
Copy link
Member

syuilo commented Jun 1, 2024

👍👍👍

kanarikanaru added a commit to kanarikanaru/misskey that referenced this pull request Jun 13, 2024
kanarikanaru added a commit to kanarikanaru/misskey that referenced this pull request Jun 13, 2024
This reverts commit 8592716.

Revert "fix(backend): use insertOne insteadof insert/findOneOrFail combination (misskey-dev#13908)"

This reverts commit 2b8056a.

Revert "enhance(backend): sentry integration for job queues"

This reverts commit d4a8c63.

Revert "fix"

This reverts commit 65d1927.

Revert "enhance(backend): improve sentry integration"

This reverts commit ab69e11.

Revert "enhance(backend): improve sentry integration"

This reverts commit a697a7f.

Revert "lint fixes"

This reverts commit d55e638.

Revert "enhance(backend): improve sentry integration"

This reverts commit 8f833d7.

Revert "feat: 通報を受けた際にメールまたはWebhookで通知を送出出来るようにする (misskey-dev#13758)"

This reverts commit 61fae45.
kanarikanaru added a commit to kanarikanaru/misskey that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants