3 ms·
Personally, I prefer raw sql over something like an ORM. So many times I want to get all users, with all posts, with all post comments (example). You can do an
by eddd-ddde 3y ago
Personally, I prefer raw sql over something like an ORM. So many times I want to get all users, with all posts, with all post comments (example).
You can do an array aggregate to get all users and their posts in the array, with build_jsonb_object you can make the posts an object of say id and content. But then you can't really make another array aggregate per post.