Closed 9t8 closed 1 month ago
Hello,
As you've correctly pointed out, there is a discrepancy between the documentation and the actual behavior of the select() method. The documentation states that if no columns are provided, the select() function "defaults to *", which implies that all columns should be selected. However, in the current implementation, if no arguments are passed to select(), it results in a HEAD request, which doesn't return any data.
I think HEAD request can be useful for users that only check if table exist or not without fetching any data which can slow down the request. So perhaps an update for documentation is preferable in this case
Hi, thanks for reporting this.
Behavior should be aligned between client libs, select()
without arguments should default to *
all columns.
If you need to use HEAD
method, you can specify head=True
when calling the select method (just like JS), at least this should be the behavior in Python too.
From what I see, this isn't supported as expected.
This fix would be a breaking change, tho currently it has the wrong behavior, @silentworks what do you think about this?
I think we should apply the breaking change since this is a bug fix, the current behavior is a bug. We should probably do a minor release and not a patch release for this though.
Agreed, I'll push a PR with the fix.
Bug report
Describe the bug
The docs say the
columns
parameter ofselect()
"defaults to*
." It does not.To Reproduce
supabase.table("t").select("*")
, and get everything int
.supabase.table("t").select("")
, and get everything int
.supabase.table("t").select()
, and get no data.Expected behavior
supabase.table("t").select()
should get everything int
. I understand "defaults to*
" to mean*
is the default argument.