eCrow
DTDrizzle Team
•Created by eCrow on 8/1/2024 in #help
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
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.1 replies