How do I give an edge function similar functionality to a SQL function on supabase with role definer - Supabase