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

Inaccurate documentation for bulk inserts & deletes #51

Closed
2 tasks done
dragarcia opened this issue May 15, 2020 · 1 comment
Closed
2 tasks done

Inaccurate documentation for bulk inserts & deletes #51

dragarcia opened this issue May 15, 2020 · 1 comment
Assignees

Comments

@dragarcia
Copy link
Contributor

dragarcia commented May 15, 2020

Not so much of an issue, just an FYI.

Documentation states that to prevent accidental bulk changes, setting the option bulk to false will prevent against bulk changes in terms of PATCH or DELETE. There is however no implementation of this at the moment. This is not functional however.

Upon further investigation as well, there does not seem to be a header either that can prevent such accidental changes. Looking at the postgREST documentation, the suggested way to prevent accidental bulk changes would be through the use of a postgreSQL extension called pg-safeupdate. As such, this is beyond the scope of this package.

todo

  • Tidy up on Builder.js to remove redundancies brought by this discovery.
  • Update supabase & wiki documentation to provide the suggested way of minimising the risk of accidental bulk changes. (reference)
@dragarcia dragarcia self-assigned this May 15, 2020
@dragarcia
Copy link
Contributor Author

Update

I actually did put a check to prevent any bulk PATCH or DELETE if no filter is invoked. Nevertheless, the option bulk is still irrelevant and there is still the need to update the documentation.

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

No branches or pull requests

1 participant