使用集合并在一个N1QL(Couchbase)中取消设置



我有这个文档,我需要解开Orderstate数组,并将其设置为"可用"。

我正在尝试此N1QL语句,但它会引发错误。

update ${BUCKET} as b unset b.orderState WHERE b.type = "ao.los:pro" and 
profileInformation.iccid="${ICCID}" and profileInformation.customerId is not 
missing limit 1 END, SET b.profileState="AVAILABLE" END returning *;
UPDATE default AS b
SET b.profileState="AVAILABLE" UNSET b.orderState
WHERE b.type = "ao.los:pro"
      AND b.profileInformation.iccid = "ICCID"
      AND b.profileInformation.customerId IS NOT MISSING
LIMIT 1
RETURNING *;

更新的语法:https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/update.html

最新更新