You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a way to amend my database results with some additional data. Specifically I am storing a key in a database column and a corresponding value in a different service. I'd like to read the corresponding value from the other service and replace the key with the value in the query result. Currently this has to be done explicitly on every query, for every resulting row, which has really awkward ergonomics, is tedious and error prone.
It would be cool if custom data types could support async fromDriver and maybe even toDriver functions that would get awaited by Drizzle before returning the resulting rows. That would allow for transparent implementation of custom data types to handle functionality like outlined above. E.g. a column containing a cache key could transparently convert the key into the cached value upon read.
The text was updated successfully, but these errors were encountered:
Describe what you want
I was looking for a way to amend my database results with some additional data. Specifically I am storing a key in a database column and a corresponding value in a different service. I'd like to read the corresponding value from the other service and replace the key with the value in the query result. Currently this has to be done explicitly on every query, for every resulting row, which has really awkward ergonomics, is tedious and error prone.
It would be cool if custom data types could support async
fromDriver
and maybe eventoDriver
functions that would get awaited by Drizzle before returning the resulting rows. That would allow for transparent implementation of custom data types to handle functionality like outlined above. E.g. a column containing a cache key could transparently convert the key into the cached value upon read.The text was updated successfully, but these errors were encountered: