$or操作符
【$or操作符】
The $or operator performs a logical OR operation on an array of two or more <expressions> and selects the documents that satisfy at least one of the <expressions>. The $or has the following syntax:
{ $or: [ { <expression1> }, { <expression2> }, ... , { <expressionN> } ] }
Consider the following example:
db.inventory.find( { $or: [ { quantity: { $lt: 20 } }, { price: 10 } ] } )
This query will select all documents in the inventory collection where either the quantity field value is less than 20 or the price field value equals 10.
随机推荐
- 【linux】查看进程
查询所有:ps aux 查询某个用户:ps -u abc 终止某个进程:kill
- win32程序显示网页
说是win32,实际程序中使用了atl的东西.所以新建win32程序时,记得勾选使用atl: 代码如下: #include "stdafx.h" #include "Wi ...
- 如何解决VC "应用程序无法启动,因为应用程序的并行配置不正确 sxstrace.exe"问题
引用链接 http://blog.csdn.net/pizi0475/article/details/7790992 应用程序事件日志中: “C:\windows\system32\test.exe” ...
- MacBook下配置android adb命令使用环境
想在Mac下使用android adb命令,常用的两种配置方式: 在MacBook下配置adb命令环境(方法一) 1.下载并安装IDE (android studio) 人性化的安装,直接点击下一步下 ...
- java 8 新特性之Stream的排序/分类
Stream简介 Stream是Java8提供的一个新的API,它位于java.util.stream包下.Stream API提供了一种新的方式来对Java集合进行操作,这种操作方式极大的提高了Ja ...
- 【idea】Error:java: Compilation failed: internal java compiler error 解决办法
报错信息: 报错原因: 项目中Java版本不一致,可以查看项目中的jdk配置 1.查看项目的jdk(Ctrl+Alt+shift+S) File ->Project Structure-> ...
- ES6必知必会 (六)—— Class
1.在之前的JS面向对象编程中,如果定义一个构造函数,一般来说是这样: function Person( name , age ) { this.name = name; this.age = age ...
- cratedb 集群 docker-compose 安装试用
关于集群的配置说明可以参考官方文档,或者es 文档 详细代码参考 https://github.com/rongfengliang/cratedb-cluster-docker 参考配置 docker ...
- oracle之 Got minus one from a read call 与 ORA-27154: post/wait create failed
在部署应用的时候,有时候应用可以直接启动,但偶尔应用却无法启动,报错信息是: java.sql.SQLRecoverableException: IO Error: Got minus one fro ...
- 再记录一次delete出错的经历
调试的时候进行到delete语句时出现问题,我做的操作是在函数体内用int*申请了N个内存空间,这让我十分纳闷,为什么不能delete呢? 回忆到之前delete出错也遇过一次问题 手动封装OpenC ...