text mode json for sqlite Dq doesn't parse by default

I get SyntaxError: "undefined" is not valid JSON for json_string: text("json_string", { mode: "json" }) field.
When I use methods like:
db.query.Issue.findMany();

or
db.select().from(Issue)

while it does work and return string, If I manually select it by:
db.select({
  json_string: Issue.json_string
}).from(Issue)


I'm using D1 db.
Was this page helpful?