26/09/2025

Supabase node js crud

first thing to get a good crud is the ability to read schema. In Supabase POSTGRES SQL you can create functions such as this one

-- Example of a user-created function
CREATE OR REPLACE FUNCTION public.get_table_schema(tname text)
RETURNS SETOF information_schema.columns 
LANGUAGE sql
AS $$
  SELECT *
  FROM information_schema.columns
  WHERE table_schema = 'public' AND table_name = tname;
$$;
To top