在n1ql的WHERE子句中使用点表示法

时间:2015-07-28 19:34:39

标签: syntax couchbase n1ql

n1ql是否支持点表示法以允许根据JSON子字段的值过滤结果?

是否应该使用=is运营商?

1 个答案:

答案 0 :(得分:2)

The following command can be used to filter on a subfield:

SELECT * from `bucket` WHERE info.category = 'SPECIFIC_CATEGORY';

The documentation explains when the IS operator should be used:

The IS/IS NOT NULL/MISSING family of operators lets you specify conditions based on the existence (or absence) of attributes in a data set.

You might want run through the N1QL Tutorial.