NO CODE:
supabase.rpc("get_my_complex_query",{parameter:1})
NO SQL_EDITOR do Supabase
drop function if exists get_my_complex_query;
create function get_my_complex_query (parameter int)
RETURNS TABLE(column1 integer, column2 varchar) AS
$$
BEGIN
return query SELECT column1, column2 FROM "TableName1"
INNER JOIN "TableName2" ON "TableName1".column = "TableName2".column
WHERE "Table2".column = parameter;
END;
$$
language plpgsql volatile;
Nenhum comentário:
Postar um comentário