@MrNiceRicee is right that json_build_object and others are really hard to figure out, but I managed to do some of it. I'm looking forward to when the head of documentation position is filled in supabase so we can hopefully get some more light put on how the ORM system works. I've done some deep dives into the code and api on it so I can be somewhat useful for some problems if anyone needs any help.