@@greendsnow It is pure SQL fronted by an api gateway. When you're writing stored procedures you're writing SQL, then calling them via RPC using PostgREST
At around 19 minutes, v_rentals will never be 0, right? It would be NULL or some value 1 or greater because of the where clause. You would need to move the WHERE clause to a FILTER clause on the count function, or use IF NOT FOUND instead of checking if the count is 0. Maybe I am missing something.
@@BotondZalaiRuzsics true. I had a brain hiccup and was thinking that if you don't have any rows in the set at all, it would not return anything. Thanks for calling that out.
Now that supabase has been released, stored procedures will really make a big comeback.
That's why I'm here lol
I'm supa annoyed. what is this thing. it looks like SQL, but it's not.
@@greendsnow It is pure SQL fronted by an api gateway. When you're writing stored procedures you're writing SQL, then calling them via RPC using PostgREST
At around 19 minutes, v_rentals will never be 0, right? It would be NULL or some value 1 or greater because of the where clause. You would need to move the WHERE clause to a FILTER clause on the count function, or use IF NOT FOUND instead of checking if the count is 0. Maybe I am missing something.
Count never returns null, it returns 0.
@@BotondZalaiRuzsics true. I had a brain hiccup and was thinking that if you don't have any rows in the set at all, it would not return anything. Thanks for calling that out.