Using native$ is broken under seneca@3.4.0. release is no longer being passed to the callback.
Before, handle_result would be called apply with arguments: https://github.com/senecajs/seneca/blob/v3.3.0/seneca.js#L1029
By nature, the release function would come through.
Now, arguments is no longer passed and so this parameter gets lost:
https://github.com/senecajs/seneca/blob/v3.4.2/seneca.js#L904
native is pretty much broken without the ability to close the connection.
I'm not sure if there's a way within seneca to pass additional arguments to callback functions anymore. To mitigate this, it might be good to manage a pool internally within the store and emit a new client when native$ is invoked. Returning the client will allow end-users to call end on it.
This is, AFAIK, available on later versions of pg. This module, as it stands will need to make a few changes to work with pg@7 but I think it's probably a good call to perform the upgrade.
We've already forked this module internally to support schemas.... I'm going to do some work to upgrade to pg@latest and fix up this native issue. I'll see if I can't put together a PR for this repo.
Using
native$is broken under seneca@3.4.0.releaseis no longer being passed to the callback.Before,
handle_resultwould be calledapplywitharguments: https://github.com/senecajs/seneca/blob/v3.3.0/seneca.js#L1029By nature, the
releasefunction would come through.Now,
argumentsis no longer passed and so this parameter gets lost:https://github.com/senecajs/seneca/blob/v3.4.2/seneca.js#L904
nativeis pretty much broken without the ability to close the connection.I'm not sure if there's a way within seneca to pass additional arguments to callback functions anymore. To mitigate this, it might be good to manage a pool internally within the store and emit a new client when native$ is invoked. Returning the client will allow end-users to call
endon it.This is, AFAIK, available on later versions of
pg. This module, as it stands will need to make a few changes to work with pg@7 but I think it's probably a good call to perform the upgrade.We've already forked this module internally to support schemas.... I'm going to do some work to upgrade to
pg@latestand fix up this native issue. I'll see if I can't put together a PR for this repo.