mysqljs / mysql

A pure node.js JavaScript Client implementing the MySQL protocol.
MIT License
18.27k stars 2.52k forks source link

Support BigInt JS objects #2306

Open boenrobot opened 4 years ago

boenrobot commented 4 years ago

Recent NodeJS versions support BigInt primitives which are a perfect fit for MySQL's BIGINT data type.

I realize that merely returning BigInt primitives by default would be breaking for a lot of users and libraries, so perhaps there should be an option to use it if available in the current NodeJS version, defaulting to false, i.e. don't use it, even if supported.

glen-84 commented 4 years ago

See also https://github.com/mysqljs/sqlstring/issues/49.