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

Strip primary keys from the update payload #495

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Strip primary keys from the update payload #495

merged 1 commit into from
Aug 28, 2024

Conversation

elyobo
Copy link

@elyobo elyobo commented Aug 28, 2024

Tweaks @lauri865's work in #375 to address feedback from @psteinroe

  • applies deletions to the primary keys in the payload before calling qb.update for clarity around the intent
  • adds a test to ensure that the PKs are being removed
  • amends an existing test to ensure that the option to not remove the keys also works

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: 4d2d1e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@supabase-cache-helpers/postgrest-core Minor
@supabase-cache-helpers/postgrest-react-query Minor
@supabase-cache-helpers/postgrest-swr Minor
@supabase-cache-helpers/examples/react-query Patch
@supabase-cache-helpers/examples/swr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
supabase-cache-helpers ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:03am

Copy link

vercel bot commented Aug 28, 2024

@elyobo is attempting to deploy a commit to the psteinroe's projects Team on Vercel.

A member of the Team first needs to authorize it.

@psteinroe
Copy link
Owner

thanks @elyobo! can you fix ci? we can merge then 🙏

@elyobo
Copy link
Author

elyobo commented Aug 28, 2024

@psteinroe ran pnpm fix and pushed, should pass when it runs now

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.62%. Comparing base (9df6b25) to head (4d2d1e7).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #495      +/-   ##
==========================================
+ Coverage   93.59%   93.62%   +0.02%     
==========================================
  Files         127      127              
  Lines        1843     1850       +7     
  Branches      576      581       +5     
==========================================
+ Hits         1725     1732       +7     
  Misses         97       97              
  Partials       21       21              
Flag Coverage Δ
postgrest-core 93.62% <100.00%> (+0.02%) ⬆️
postgrest-react-query 93.62% <100.00%> (+0.02%) ⬆️
postgrest-swr 93.62% <100.00%> (+0.02%) ⬆️
storage-core 93.62% <100.00%> (+0.02%) ⬆️
storage-react-query 93.62% <100.00%> (+0.02%) ⬆️
storage-swr 93.62% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@psteinroe
Copy link
Owner

thanks @elyobo!

@psteinroe psteinroe merged commit 5bacd08 into psteinroe:main Aug 28, 2024
5 of 7 checks passed
@elyobo
Copy link
Author

elyobo commented Aug 28, 2024

No problem, thanks for this project!

@elyobo elyobo deleted the lo/do-not-set-primary-keys-in-update branch August 28, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants