您的位置:首页 > 编程语言 > Go语言

Rockmongo 查询条件总结

2016-05-31 00:00 281 查看
Json 格式查询

基本查询

{
"Deleted": "1"
}

并列条件

{
"xid": 560870,
"type": "video"
}

查询带有集合的数据

{
"Parameter.centerCityId": "6666"
}

不等于

{
"Deleted": {$ne:"1"}
}

说明:
$gt >
$gte >=
$lt <
$lte <=
$ne !=
$in : in
$nin: not in
$all: all
$not: 反匹配

判断字段是否存在

{
"Deleted": {$exists: true}
}

模糊查询%哈哈%

{
"requestParam" : {
"$regex":"哈哈",
"$options":"i"
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: