drizzle-team / drizzle-team/drizzle-orm
[BUG]: retrieved JSONB value has wrong type
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
^0.43.1
### What version of `drizzle-kit` are you using?
^0.31.1
### Other packages
_No response_
### Describe the Bug
I have a postgres JSONB column that I'm using to store strings and objects. If I store a string like "2" and I try to retrieve it using drizzle-orm (in my case I'm using `db.query.myTable.findFirst`), I get the number 2 back rather than the string "2".
I have verified using pgAdmin that the value stored in the database is a string of the form `"2"`.
I'm using bun 1.2.12, but I got the same issue with npm 11.3.0, so it doesn't appear to be runtime related.
Contributor guide
Assessment
This issue has not been assessed yet.