Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make upd function configurable #38

Open
markmcdowell opened this issue Mar 26, 2018 · 1 comment
Open

make upd function configurable #38

markmcdowell opened this issue Mar 26, 2018 · 1 comment

Comments

@markmcdowell
Copy link

markmcdowell commented Mar 26, 2018

Hello, great library it works well!

Unfortunately as is typical with kdb, we have a custom upd function this is actually .u.upd

This means I can't subscribe with out hacking the following line:

if (err === undefined && Array.isArray(o) && o[0] === "upd") 
{
   events.EventEmitter.prototype.emit.apply(self, o);
} 

to

if (err === undefined && Array.isArray(o) && o[0] === ".u.upd") 
{
   o[0] = "upd";
   events.EventEmitter.prototype.emit.apply(self, o);
} 

Any chance we could change to pass in the function name to subscribe to?

@michaelwittig
Copy link
Owner

Hi @markmcdowell sounds reasonable.
Are you familiar with opening a Pull Request? You fork the project, make your change in a separate branch and then open a PR. Besides your code changes we need to make the "upd" / ".u.upd" string configurable (e.g. on the Connection), some tests, update to the docs.

@michaelwittig michaelwittig changed the title upd make upd function configurable Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants