David
DTDrizzle Team
•Created by David on 12/5/2024 in #help
Smart way to prepare data for frontend
As you can imagine, query returns aren't exacly pretty, and they'll have rows for each value that matches.
For example, let's say you want to grab posts and comments. On your select, you'd have a row (or in drizzle case, an object for each row) for each post and comment. something like
Is there a way (without scripting on the js side), to map certain keys to a schema you want to have? In this scenario I'd like to have something like
This is just a simple example, let me know if my explanation wasn't clear enough.
11 replies