Open princefishthrower opened 3 months ago
Thanks for the issue first of all! I will check and send the result here asap!
Which postgrest-go version did you use?
Just noting that Insert works for me, like so:
rowJSON := map[string]string{"column1":"val1", "column2":"val2"}
client.From(mytable).Insert(rowJSON, false, "", "representation", "").Execute()
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
orUpsert
on any postgres table usingsupabase-go
. I've tried the following combinations:I've tried for when the row exists and when it does not;
Upsert
andInsert
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
Additional context
I do notice there are no tests including
Insert
orUpsert
, perhaps adding those would help be a cross check against this bug into the future.