Closed savvione closed 8 years ago
I just discovered this so I haven't tried it, but just to speculate. The results of a "by clause" query will be a keyed table, not a normal table, so maybe node-q doesn't handle that properly. Have you tried something as simple as putting "0!" in front of the query to remove the key - it will make the result a normal table which node-q may have more luck with.
A keyed table in Q is actually represented as a dictionary, the key of which is a table representing the cols / rows of the key, the value of the result dictionary is also a table, representing the values on the keyed table.
I fixed one bug associated with this (use version 1.1.1). A keyed table is now (as c.js does) turned into an Array of size 2 where the first element contains the keys and the second contains the values. Each is an array of objects.
But the question that remains open is how should a keyed table be turned into JavaScript because we don't have a very useful data structure to use. Any ideas on that?
Hi Michael,
Great work on the module! I've run into an issue - it seems like 'by' clauses confuse node-q. It doesn't throw an exception, I just get an empty-ish result: