LMLPHP后院

MongoDB 正则查询

MongoDB 正则表达式查询,示例:

> db.collection_name.find({"name":/lmlphp.*/i})

元操作符 $not 取反,示例:

> db.collection_name.find({"name":{$not:/lmlphp.*/i}})

$not 取模:

> db.collection_name.find({"id":{$not:{$mod:[10,1]}}})
2022-12-01 19:08:58 1669892938 0.008518