Handling String Values in range and idRange for viewQuery() in Node.js SDK?

"When passing the range and idRange values as strings in the options of viewQuery(), they are not processed correctly. In the couchbase node.js SDK (specifically in viewexecutor.js), removing JSON.stringify() seems to solve the issue. It appears that the problem arises when strings are used, possibly due to the addition of quotation marks.

In other words, only numeric values seem to work correctly for range and idRange. How can I modify the code so that it also works properly when strings are passed?"

Couchbase 7.2.2, Node.js SDK 4.2.7, Windows 11

Upon further examination, I’ve noticed that range works correctly with both numbers and strings. However, idRange does not function properly when strings are used.

Additionally, I’ve encountered another issue where the key values in the viewQuery results are enclosed in double quotes. I’ve confirmed that the REST API returns the correct values without double quotes.

ViewRow {
value: [Object],
key: ‘“zqu2olrh”’,
id: ‘replica-zqu2olrh’
},

That is reported in https://issues.couchbase.com/browse/JSCBC-1214

Does including quotes in the strings themselves solve this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.