We have a reserved word as an identifier and are not able to run n1ql queries on them.
The reserved word we have used is ‘value’ and it stores an array of value.
According to this documentation (http://developer.couchbase.com/documentation/server/4.0/n1ql/n1ql-language-reference/reservedwords.html) we have used back ticks to escape the identifier but it doesn’t seem to be working inside that of a collection expression.
select config.* from default AS config where config.documentType = ‘Configuration’ and name =‘AirlineCode’ and ANY val IN config.value
SATISFIES val.IsActive = false
Error:
[{“code”:3000,“msg”:“syntax error - at )”},{“original_query”:“select cbq_query_workbench_limit.* from (select config.* from UCShoppingCart AS config where config.documentType = ‘Configuration’ and config.scope=‘AirlineMapping’ and category = 'Mapping’and name =‘AirlineCodeDesc’ and ANY val IN config.value
SATISFIES val.IsActive = false ) cbq_query_workbench_limit limit 500;”}]
This executes without an error
select config.* from default AS config where config.documentType = ‘Configuration’ name =‘AirlineCode’ and config.value[0].IsActive
= true;
Question is will the escape character work within the collection operator, if not we will have to change the identifier.
Please advise.