node-mysql2
node-mysql2 copied to clipboard
fix the type of ResultSetHeader **insertId** attribute type
database table ID either number or string
Nope. LastInsertId has to be number.
https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html
when bigNumberStrings setting is set to true insertId is returned as string ( when it can't fit js number )
ah I forgot
I'm not a fan of this polymorphic results but not quite sure how to improve ( and in backwards compatible way )
we can probably retire Long.js and return native BigInt here so the type will be number | BigInt ( still polymorphic )