We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the actual type of all roles, and me trying to use it. You can see it is correctly an array and has no null value in it.
However, I get this error, which says I can't set a single value to an array. Clearly, other parts of Supabase knows this IS an array.
Steps to reproduce the behavior, please provide code snippets or a repository:
SETOF
An easy test would be to create a computed function on the profiles table that returns a SETOF any other table records (see below).
profiles
I shouldn't need to use override at all, but the return value is single and possibly null outside the box. Here is what it looks like.
Here is my actual computed function, but it could be any table.
CREATE OR REPLACE FUNCTION public.all_roles(profiles) RETURNS SETOF public.roles LANGUAGE sql SET search_path = '' AS $$ SELECT * FROM public.roles; $$;
The purpose of this, of course, is to be able to query the database once and remove extraneous fetches.
"@supabase/ssr": "^0.6.1", "@supabase/supabase-js": "^2.49.8"
I think BOTH override needs to be fixed and the original type problem.
J
The text was updated successfully, but these errors were encountered:
So I fixed the overrideTypes problem like a dummy.
.overrideTypes<{ all_roles: Database['public']['Functions']['all_roles']['Returns'] }[]>();
and of course forgot the:
all_roles(role_name, role_id)
Original problem still needs to be fixed, as I shouldn't have to overrrideTypes().
Any time line on this? Creating manual types for complex relationships gets tedius.
Sorry, something went wrong.
No branches or pull requests
Bug report
Describe the bug
Here is the actual type of all roles, and me trying to use it. You can see it is correctly an array and has no null value in it.

However, I get this error, which says I can't set a single value to an array. Clearly, other parts of Supabase knows this IS an array.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
SETOF
of any table.An easy test would be to create a computed function on the
profiles
table that returns a SETOF any other table records (see below).Expected behavior
I shouldn't need to use override at all, but the return value is single and possibly null outside the box. Here is what it looks like.
Function
Here is my actual computed function, but it could be any table.
The purpose of this, of course, is to be able to query the database once and remove extraneous fetches.
System information
Additional context
I think BOTH override needs to be fixed and the original type problem.
J
The text was updated successfully, but these errors were encountered: