N1ql -> IN operator does not work with other conditions

后端 未结 2 1760
自闭症患者
自闭症患者 2020-12-20 19:53

The following query works just fine when only IN operator is used
SELECT META().id FROM bucket_name WHERE description IN [\'Item1\',\'Item2\']

But w

2条回答
  •  感情败类
    2020-12-20 20:17

    With the latest N1QL developer preview (http://docs.couchbase.com/developer/n1ql-dp3/n1ql-intro.html) the IN clause does not need to be parenthesized, so this should work:

    SELECT META(b).id FROM bucket_name b WHERE id = 123 AND description IN ['Item1','Item2']
    

    You need to pass the bucket name (or alias) to META() I think because N1QL now supports queries on multiple buckets.

提交回复
热议问题