Skip to content

Commit 8dcf079

Browse files
Update README.md
improved description of handling of DECIMAL types
1 parent 5c2c502 commit 8dcf079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ con.query({ sql: 'select 1 as foo, 2 as foo', rowsAsArray: true }, function(err,
248248
249249
MySQL2 is mostly API compatible with [Node MySQL][node-mysql]. You should check their API documentation to see all available API options.
250250
251-
One known incompatibility is that `sum` and `avg` results are returned as strings rather than numbers. This is deliberate to avoid loss of precision - see https://github.com/sidorares/node-mysql2/issues/935.
251+
One known incompatibility is that `DECIMAL` values are returned as strings whereas in [Node MySQL][node-mysql] they are returned as numbers. This includes the result of `SUM()` and `AVG()` functions when applied to `INTEGER` arguments. This is done deliberately to avoid loss of precision - see https://github.com/sidorares/node-mysql2/issues/935.
252252
253253
If you find any other incompatibility with [Node MySQL][node-mysql], Please report via Issue tracker. We will fix reported incompatibility on priority basis.
254254

0 commit comments

Comments
 (0)