-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Describe the bug
As the title states, Insert and Upsert do not work - they fail to create and/or update records respectively.
To Reproduce
Try to call Insert
or Upsert
on any postgres table using supabase-go
. I've tried the following combinations:
s.Client.From("my_table").Insert(bytes, true, "", "minimal", "exact").Execute()
s.Client.From("my_table").Insert(bytes, false, "", "minimal", "exact").Execute()
s.Client.From("my_table").Insert(bytes, true, "", "representation", "exact").Execute()
s.Client.From("my_table").Insert(bytes, false, "", "representation", "exact").Execute()
s.Client.From("my_table").Upsert(bytes, "", "representation", "exact").Execute()
s.Client.From("my_table").Upsert(bytes, "", "minimal", "exact").Execute()
s.Client.From("my_table").Upsert(bytes, "my_primary_key_column", "representation", "exact").Execute()
s.Client.From("my_table").Upsert(bytes, "my_primary_key_column", "minimal", "exact").Execute()
I've tried for when the row exists and when it does not; Upsert
and Insert
fail to update or create the record respectively. The strangest thing is that no error is reported, and with "representation", I always get an empty array.
Expected behavior
The desired row should be inserted. In the case of already existing by primary key, upserted.
Screenshots
N/A
System information
- OS: macOS
- Go version 1.21.11
Additional context
I do notice there are no tests including Insert
or Upsert
, perhaps adding those would help be a cross check against this bug into the future.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working