Properties 子文档中数字属性名称的Couchbase查询

Properties 子文档中数字属性名称的Couchbase查询,properties,couchbase,n1ql,Properties,Couchbase,N1ql,我的文档如下所示: { "mobile": { "default": { "s": { "camp": { "100112": 0, "100114": 0, "100122": 0 }, "score": 1 } } } } 我想选择一个具有以下条件的文档: select * from my_bucket where mobile.def

我的文档如下所示:

{
  "mobile": {
    "default": {
      "s": {
        "camp": {
          "100112": 0,
          "100114": 0,
          "100122": 0
        },
        "score": 1
      }
    }
  }
}
我想选择一个具有以下条件的文档:

select * from my_bucket where mobile.default.s.camp.100112 = 0
但我有一个语法错误:

[
  {
    "code": 3000,
    "msg": "syntax error - at 100112",
    "query_from_user": "select  * from `user_scoring_sample` t where mobile.default.s.camp.100112 = 0"
  }
]

是否允许具有数字属性名?我们必须在n1ql查询中转义它们吗?

您可以使用反勾字符转义关键字、带有特殊字符的表/属性以及数字表/属性

例如:

SELECT * FROM my_bucket where mobile.default.s.camp.`100112` = 0