Closed richardbutler closed 8 years ago
what about
nodeq.k(".xyz.getTrades[`VOD.L;2015.07.08;0t;2015.07.09;24t;()!()]", function(err, res) { ... });
No joy, but I did find out the cause of the problem. This one gets through:
nodeq.k('`xyz.getTrades', '`VOD.L', new Date(2015, 6, 8), '0t', new Date(2015, 6, 9), '24t', {}, function ...
But time values, e.g. 0t
, 24t
, are getting sent to Q as strings. How would you expect c.js to handle those?
the problem is, that JavaScript does not have as much types as q have. e.g. we have no type for times.
I made a slight mistake is my previous line (edited this one as well), this one should work:
nodeq.k(".xyz.getTrades[`VOD.L;2015.07.08;0t;2015.07.09;24t;()!()]", function(err, res) { ... });
Providing a string that is then evaluated as q code on the q side is at the moment the version that gives you the most control.
Bingo. Thanks!
always happy to see someone using q/kdb+ :)
I'm trying to query a function, which would be called q-side like this (this would return me a table):
However, I've tried a few variations, such as the below (and every permutation between symbols, date objects, strings, etc) with
nodeq.k
without success, but I'm not sure which part is getting corrupted as KDB errors are, well, you know :)And also the full command as a string:
I get varying errors but mostly
badreq
. Is there something obvious that I'm doing wrong here?