You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node-sqlite faithfully implements the row-as-map style expressed in the w3c spec. This is convenient for js programmers as rows are just js objects.
However if you consider a query like:
"select foo.color, bar.color from foo natural join bar"
Since each row is a map, and the key is the field name (i.e. not fully-qualified) every row in the resulting rowset will have only bar.color's value.
A clean way to handle this problem would be to have an alternative row format - that's just the values in an array in proper order, i.e. an array of values instead of the convenient js object. I'd be wiling to brush off my ancient C++ skillz and take a shot at such a thing, but I'd like some guidance / suggestion on how the api should look before I do that...the "query" method seems to be overridden to begin with, so I'm not sure where would be a good place to drop in something like a map of options ( {rowStyle:"array"} ).
Thoughts?
The text was updated successfully, but these errors were encountered:
This is more a "discussion" than an issue.
node-sqlite faithfully implements the row-as-map style expressed in the w3c spec. This is convenient for js programmers as rows are just js objects.
However if you consider a query like:
"select foo.color, bar.color from foo natural join bar"
Since each row is a map, and the key is the field name (i.e. not fully-qualified) every row in the resulting rowset will have only bar.color's value.
A clean way to handle this problem would be to have an alternative row format - that's just the values in an array in proper order, i.e. an array of values instead of the convenient js object. I'd be wiling to brush off my ancient C++ skillz and take a shot at such a thing, but I'd like some guidance / suggestion on how the api should look before I do that...the "query" method seems to be overridden to begin with, so I'm not sure where would be a good place to drop in something like a map of options ( {rowStyle:"array"} ).
Thoughts?
The text was updated successfully, but these errors were encountered: