Convenient Function to map SQL Column keys to JS Column keys
I have a magic sql query that returns an entire row after an update. I need to remap the column keys from the SQL Table to the keys I defined on the pgTable in JS since they aren't the same. Is there a convenient function to do that?
Minimal example:
The table definition.
The update query (Drizzle ORM does not have the
Is there a way to conveniently get the JS keys from executing magic sql?
Thank you.
Minimal example:
The table definition.
The update query (Drizzle ORM does not have the
from clause for the update builder... See https://github.com/drizzle-team/drizzle-orm/issues/2304)Is there a way to conveniently get the JS keys from executing magic sql?
Thank you.
GitHub
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too
- Issues ยท drizzle-team/drizzle-orm