What, besides being implemented in Node, makes this substantially different from using the built in json_agg function from Postgres, as in:
https://stackoverflow.com/questions/24006291/postgresql-retu...
https://stackoverflow.com/questions/24006291/postgresql-retu...
SELECT json_agg(row_to_json(*))
work? select array_to_json(array_agg(row_to_json(t))) from (select * from name) t
seems to work...