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

Delete all query #534

Closed
PLLX76 opened this issue Sep 1, 2023 · 1 comment
Closed

Delete all query #534

PLLX76 opened this issue Sep 1, 2023 · 1 comment

Comments

@PLLX76
Copy link

PLLX76 commented Sep 1, 2023

Hello, this is to know if it was possible to delete all the data in a table because it causes an error. My code :

supabase.table("messages").delete().execute()

And my error

APIError: {'code': '21000', 'details': None, 'hint': None, 'message': 'DELETE requires a WHERE clause'}

thank you in advance for your response

@J0
Copy link
Collaborator

J0 commented Sep 15, 2023

Hey!

We don't support this both in the Python and the JS lib. It is allowed if you directly query Postgres but we recommend using filters.

The workaround is to use an rpc call (which we're fixing right now)

Going to close but let me know if there are further issues. Thanks!

@J0 J0 closed this as completed Sep 15, 2023
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

2 participants