You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it's not an issue with the current promise wrapper...
But to me it seems like it just add overhead/complexity to the architecture to mix both callbacks and promises - now i haven't looked much at the source code yet to have any say at it.
maybe it's just too large/complex to make any changes or maybe someone is using an extra callback parameters. Maybe it's due to some more lower level api that makes reading streams not doable or you are supporting older node versions? or someone is using a own custom promise lib like bluebird. or you simply just use a dependency that only works with callbacks.
And changing it could be a breaking change
there could be many reason for closing this issue since it's not really an issue. But maybe this could be a long term goal?
if it's reading packages from stream and adding listeners to when you receive data
maybe a replacement could be to use the new asyncIterator that's available in newer node versions?
I could imagen a lower level api to work something like this:
it's a mix of all the reasons, at the moment I don't see a compelling reason to rewrite low level core with more modern primitives. At the same time happy to continue improving public api ergonomics
Mysql packets are quite difficult to parse without context, you need to know which type of packets you want to parse before you start. Because of that internal logic is a bit more complex than "serialize a packet, send, read incoming packets, deserealize", we need to have some sort of state machine to use correct parser for a packet
There is a bit of discussion of using async iterators to fetch rows here - #822 (comment)
it's not an issue with the current promise wrapper...
But to me it seems like it just add overhead/complexity to the architecture to mix both callbacks and promises - now i haven't looked much at the source code yet to have any say at it.
maybe it's just too large/complex to make any changes or maybe someone is using an extra callback parameters. Maybe it's due to some more lower level api that makes reading streams not doable or you are supporting older node versions? or someone is using a own custom promise lib like bluebird. or you simply just use a dependency that only works with callbacks.
And changing it could be a breaking change
there could be many reason for closing this issue since it's not really an issue. But maybe this could be a long term goal?
if it's reading packages from stream and adding listeners to when you receive data
maybe a replacement could be to use the new asyncIterator that's available in newer node versions?
I could imagen a lower level api to work something like this:
The text was updated successfully, but these errors were encountered: