Selecting DATE_TRUNC returns string but types as Date
Hi,
I have an issue that drizzle types the return type of
I boiled it down to the DATE_TRUNC function (and grouping by it) to cause the database to return strings instead,
if I just select and group by
Since DATE_TRUNC is supposed to return TIMESTAMP, I'm confused as to why drizzle still gives me strings.
Is there a way how I can select and group by the "hour" of a timestamp but still full Date objects back?
The code:
schema:
I have an issue that drizzle types the return type of
due as Date, even though they are strings.I boiled it down to the DATE_TRUNC function (and grouping by it) to cause the database to return strings instead,
if I just select and group by
cardSchedules.due I actually get Date objects back.Since DATE_TRUNC is supposed to return TIMESTAMP, I'm confused as to why drizzle still gives me strings.
Is there a way how I can select and group by the "hour" of a timestamp but still full Date objects back?
The code:
schema: