Closed Hu-Wentao closed 3 years ago
~Related to this https://github.com/supabase/supabase/issues/859~ ~Maybe
postgrest-dart
doesn't add double quote to table, column with uppercase chars.~
postgrest can handle uppercase table name and column name. It' not a problem with uppercase char.
from ("Test ").Insert({"foo",3}).execute();
your insert object is wrong. it should be
postgrest.from('Test').insert({'id':3, 'foo':"hello-world"}).execute();
from ("Test ").Insert({"foo",3}).execute();
your insert object is wrong. it should be
postgrest.from('Test').insert({'id':3, 'foo':"hello-world"}).execute();
What I mean by that is to use a self-incrementing primary key.
When I was using Supabase, I found that the primary key was automatically generated only by changing the table name to lowercase, and if the table name was uppercase, it would be an error
Hi @Hu-Wentao, I add unit-test for insert/delete/select with uppercase table name. They works properly https://github.com/supabase/postgrest-dart/commit/954c10c19140c3beab0cb800bcd0461f7335c3b6
can you try again on your side and let me know the result. Thanks
Sorry that I did not check issues in time, because I later used SpringBoot to build backend.
I just re-tested it with the old code, and it didn't throw any exceptions.
Thank you all for your great work anyway!
Bug report
Lest the table name begins with an uppercase, an error is thrown when data is inserted: "message: null value in column "id" not-null constraint"
Describe the bug
Table names can only be used properly if they begin with a lowercase letter
To Reproduce
Test
id
andfoo
fields and set them toint4