db.select() from magic sql`` operator returns array of empty objects

I am generating a set of dates using generate_series and I can't get it to actually return the dates in drizzle. Here is the query: db.select().from(sqlgenerate_series(make_date(2024,2,1), make_date(2026,12,1), '1 month'::interval)); When I use drizzle runner in studio, it returns the proper number of results in an array of empty JSON objects. If I run SELECT * FROM generate_series(make_date(2024,2,1), make_date(2026,12,1), '1 month'::interval) in SQL console, it works just fine. How can I tell db.select() to pull the values out and not return an array of empty objects?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?