$in 操作符
【$in 操作符】
The $in operator selects the documents where the value of a field equals any value in the specified array.
$in 选择包含指定值之一的 doc。
If the field holds an array, then the $in operator selects the documents whose field holds an array that contains at least one element that matches a value in the specified array
Use the $in Operator with a Regular Expression
The $in operator can specify matching values using regular expressions of the form /pattern/. Youcannot use $regex operator expressions inside an $in.
Consider the following example:
db.inventory.find( { tags: { $in: [ /^be/, /^st/ ] } } )
This query selects all documents in the inventory collection where the tags field holds an array that contains at least one element that starts with either be or st.
参考:https://docs.mongodb.org/manual/reference/operator/query/in/#op._S_in
最新文章
- Lua 协程coroutine
- Erlang及Rabbitmq安装
- highcharts 统计的样式
- android -- 蓝牙 bluetooth (五)接电话与听音乐
- delphi 插入表格HTML代码
- Build Error 6041: Internal build error
- jquery的使用 超级快速入门 熟练使用
- 【shell编程基础0】bash shell编程的基本配置
- robotframework文本类型的下拉框
- 在MySQL和PostgreSQL之外,为什么阿里要研发HybridDB数据库?
- shell编程练习(二): 笔试11-20
- sys.exit(main(sys.argv[1:]))
- JSJ—类与对象
- AMD-requireJS
- java、python与留下迷点的php hash collision
- Linux知识扩展一:执行前为什么加./
- UVALive - 6440(模拟)
- NodeJS收发GET和POST请求
- 用Collections升降排序
- Android 修改系统默认density
热门文章
- DIY远程移动图像监测(tiny6410+USB摄像头+motion+yeelink+curl)
- php http build query
- Hadoop/Spark入门学习笔记(完结)
- Java第三次作业--面向对象基础(封装)
- I.MX6 Manufacturing Tool V2 (MFGTool2) ucl2.xml hacking
- hdu 3613 Best Reward
- ASP.NET MVC3默认提供了11种ActionResult的实现
- fusionjs 学习一 基本试用
- flash exe to flv swf
- 什么是HBase(五) HBase的运维工具