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]}}})
2024-11-19 04:37:36 1731962256 0.009461