Type error working with Postgres dates in v.0.30.1
I'm using Drizzle with postgresjs and recently updated to v0.30.1, where I know the driver was updated to always return strings for dates.
After the update, many of my queries then failed with an error
Here's an example of a failed query that produced that error message:
Where
When I convert
Any tips would be appreciated. Thank you!
After the update, many of my queries then failed with an error
ERR_INVALID_ARG_TYPE: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date". Here's an example of a failed query that produced that error message:
Where
sessions.timestamp is defined as timestamp('timestamp', { mode: 'date', withTimezone: true }) in my schema.When I convert
startDate to a string with .toISOString(), the query works, but I get the following type error:Any tips would be appreciated. Thank you!