Skip to content

Conversation

@buuug7
Copy link

@buuug7 buuug7 commented Dec 20, 2020

database table ID either number or string

database table ID either **number** or **string**
@testn
Copy link
Contributor

testn commented Nov 5, 2021

Nope. LastInsertId has to be number.

https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html

@sidorares
Copy link
Owner

when bigNumberStrings setting is set to true insertId is returned as string ( when it can't fit js number )

@testn
Copy link
Contributor

testn commented Nov 5, 2021

ah I forgot

@sidorares
Copy link
Owner

sidorares commented Nov 5, 2021

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 )

@wellwelwel wellwelwel added typescript needs rebase For internal organization purpose needs investigation labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs investigation needs rebase For internal organization purpose typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants