mongo查询语法收藏

查询表达式

含义

Mongo原生查询条件

neq 或者ne

不等于

$ne

lt

小于

$lt

lte 或者elt

小于等于

$lte

gt

大于

$gt

gte 或者egt

大于等于

$gte

like

模糊查询 用MongoRegex正则模拟

mod

取模运算

$mod

in

in查询

$in

nin或者not in

not  in查询

$nin

all

满足所有条件

$all

between

在某个的区间

not  between

不在某个区间

exists

字段是否存在

$exists

size

限制属性大小

$size

type

限制字段类型

$type

regex

MongoRegex正则查询

MongoRegex实现

exp

使用MongoCode查询

原文地址:https://www.cnblogs.com/imap/p/2707525.html