mapWith not running in Drizzle queries (db.query)

Hello, not sure if this is the best place to post this (please let me know if I should follow-up on this issue someplace else). I believe there's a bug causing mapWith to not run in Drizzle queries (db.query) when using certain native SQL functions. SQLite example: https://drizzle.run/n509hxyyy5prp2roiyjs6em6 In this example, json_object is returned as a stringified object unless I use the traditional query syntax. I have added mapWith(() => "a") to make it obvious that mapWith is not running. PostgreSQL example: https://drizzle.run/d898kcgfpmzfhdewjnyn4jdp In this example, json_build_object is returned correctly as an actual object. However, mapWith is not running unless I use the traditional query syntax. I have added mapWith(() => "a") to make it obvious that mapWith is not running. These examples are very minimal but I'm running into this issue in a production app where I use a function that constructs nested subqueries with dynamic columns and returns the subquery data as JSON (or a stringified JSON in SQLite if I use the Drizzle query syntax).
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?