Set集合方式操作
set集合的的特点:集合内不能有重复值
初始一个集合数据
bucket.upsert('name-set', ["revin"], function(err, result) {
if (err) throw err;
console.log(result);
});Web UI 查看结果:

集合中添加数据
Web UI 查看结果:

注意:不能集合不能有重复的值,所以添加重复值会报错.
判断集合中是否存在某值
console结果:
获取集合大小
console结果:
删除集合中的值
Web UI 查看结果:

Last updated
Was this helpful?