supabase-go
supabase-go copied to clipboard
DELETE requires a WHERE clause
Hi, thanks for writing this package. I'm trying to delete all rows in a table (see below)
This:
var results map[string]interface{}
err := supabase.DB.From("events").Delete().Execute(&results)
if err != nil {
panic(err)
}
Panics with this:
panic: 21000: DELETE requires a WHERE clause
It seems incongruous that this is required:
err := supabase.DB.From("events").Delete().Like("evt_name","*").Execute(&results)
When this just works in Postgres:
DELETE from events
Is this a bug or a feature or am I missing something?
Thanks in advance.