Float values get casted to int while reading from DB

When reading float value from db ,it gets casted into integer. These values were inserted into the mysql db using drizzle. drizzle orm: 0.28.6
10 Replies
adiSuper94
adiSuper94OP10mo ago
@Angelelz ?
Angelelz
Angelelz10mo ago
Can you share a little bit more info? What your code looks like?
adiSuper94
adiSuper94OP10mo ago
@Angelelz hope this helps
schema.js
No description
No description
No description
No description
Angelelz
Angelelz10mo ago
What data type would you like that float to have? In JS
adiSuper94
adiSuper94OP10mo ago
I don't really care about the datatype.
I want access the number along with decimal part. I don't want 727.4 to be rounded off to 727.
Angelelz
Angelelz10mo ago
I've never seen this behavior. What driver are you using?
adiSuper94
adiSuper94OP10mo ago
occuring on both old and new
adiSuper94
adiSuper94OP10mo ago
Also, I could find whole number differences between actual value in db vs value read by drizzle.
No description
Angelelz
Angelelz10mo ago
Did you verify that stringifying the row is not causing the issue?
adiSuper94
adiSuper94OP8mo ago
I dont doesn't look like strigify is the issue, for this. Any update ?
Want results from more Discord servers?
Add your server