Timestamp as string
so when i have a timestamp in string mode, setting
new Date().toISOString()
does not work - i need to drop the trailing Z
from it
can drizzle handle this?2 Replies
Maybe, not sure. We can perform runtime checks for valid strings in each dialect. However, I'm uncertain about the possibility of making your string a valid one. I need to think a bit more to determine if it's really possible (maybe it is).
Regardless, there are other measures you can take to ensure your app handles dates exactly as you desire.
You can implement a custom mapping logic to achieve the same
timestamp in string mode
behaviour but with more control.
yeah this is making me realize that iso8601 is not the standard
basically i want
mode: "string"
to return iso8601 timestamps
and same for writing them
custom type is a good solution