Float2Str float scientific notation causes query error #708
Answered
by
methane
fizz-is-fish
asked this question in
Q&A
-
When I use django orm to query, it will concatenate all float numbers with e0 by default. When the database field type is float, it will cause a query error. |
Beta Was this translation helpful? Give feedback.
Answered by
methane
Mar 11, 2024
Replies: 1 comment 6 replies
-
2.0 is not float, but decimal. 2.0e0 is float. So using 2.0 cause error. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No. floating point number always needs e0. There is no difference for MySQL 5.6.
It is your bug. Removing e0 from driver is bad fix.
Learn about decimal/floating number and float/double and fix your schema and SQL.