【$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.

  

随机推荐

  1. Beta发布

    作业要求[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2408] 视频展示 链接[https://www.cnblogs.com/erc ...

  2. Alpha阶段第2周/共2周 Scrum立会报告+燃尽图 05

    作业要求[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2287] 版本控制:https://git.coding.net/liuyy08 ...

  3. mac 终端 使用ftp命令

    Mac下使用命令行登陆ftp 最近使用forklift下载服务器pureftp上的东西,总是断断续续的,经常下载到99%然后显示下载失败,非常不舒服!原以为是forklift的问题,换了transmi ...

  4. 开始yaf之旅

    目录结构 + public //网站根目录 - index.php //入口文件 - .htaccess //重写规则 + conf |- application.ini //配置文件 applica ...

  5. Mysql 时间日期函数运用与总结

    Mysql 中的时间与日期常常会用到,但是每次都得找,这里结合工作日常总结一下. |--获取当前时间[正常时间] 1. MySQL 获得当前时间函数:current_timestamp, curren ...

  6. 6-3 Add Two Polynomials(20 分)

    Write a function to add two polynomials. Do not destroy the input. Use a linked list implementation ...

  7. POJ3696 The Luckiest number

    题意 Language:Default The Luckiest number Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7 ...

  8. fackbook flow 简单使用

    flow 是一个javascript 静态检查的工具,由facebook 开发, 使用起来简单,方便. 安装 项目初始化 yarn init -y 编译器安装 yarn add --dev babel ...

  9. ambassador 学习四 grpc 处理

    实际上都是envoy 的功劳 基本环境安装参考相关文档即可 参考demo proto code syntax = "proto3"; option java_multiple_fi ...

  10. nexus 使用Raw Repositories 进行maven site 发布

    实际项目中我们可能需要进行maven 项目的site 文档发布,一般的处理是生成之后,然后在进行发布到一个静态 服务器进行页面访问,nexus3 提供了一个Raw Repositories 很方便可以 ...