Skip to content

DELETE requires a WHERE clause #48

Open
@LaughingBubba

Description

@LaughingBubba

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions