Closed wwarby closed 5 years ago
The reason might be that you send a dict instead of a table in the second example. If you flip the dict you get a table.
Unfortunately, there is no typed support for tables. I haven't implemented when I was working on this: https://github.com/michaelwittig/node-q/blob/master/lib/typed.js#L265
Thanks so much Michael, that works perfectly. I'd tried a lot of things, but that wasn't one of them. For the benefit of anyone else who encounters this problem, this is the correct syntax:
conn.k('upd', nodeq.symbol('demoTable'), [
{ demoSymbol: nodeq.symbol('a') },
{ demoSymbol: nodeq.symbol('b') }
], callback);
Apologies if this is my mistake because I'm very new to node-q (and q itself) but I'm struggling to send tabular data to the upd function (or any function for that matter) as an argument to the k function rather than as a raw string. Specifically:
This works:
But this does not:
The latter give a
'type
error response.I've tried a few variations of this without success. Is what I'm trying to do actually possible with node-q? All I'm really aiming for is to insert data into a table without composing the raw q string myself.