drizzle-team / drizzle-team/drizzle-orm
[BUG]: jsonb values are double-JSON.parse()'d on select
Open
bug
bug/fixed-in-beta
db/postgres
priority
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
0.33.0
### What version of `drizzle-kit` are you using?
0.23.0
### Describe the Bug
I'm using drizzle + node postgres.
When I store a string e.g. `"10.5"` under a jsonb column, I expect it to be returned as "10.5" in string format. Instead it's returned as 10.5
This is probably because node-postgres does JSON.parse once, and then the jsonb column does it again.
### Expected behavior
When I store a string e.g. `"10.5"` under a jsonb column, I expect it to be returned as "10.5" in string format.
### Environment & setup
drizzle + node postgres
computer: macos
Contributor guide
Assessment
This issue has not been assessed yet.