$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. DIY远程监控室内温度设备(tiny6410+ds18b20+yeelink+curl)

    春节了,趁着假期的空闲时间,抽空捣鼓了下tiny6410开发板,发现这个东东尘封许久,很长时间没用过了.貌似最近物联网大热,谷歌收购Nest,其设计的恒温器能够智能调节和远程控制房间的温度,UI和设计 ...

  2. 三十分钟理解:双调排序Bitonic Sort,适合并行计算的排序算法

    欢迎转载,转载请注明:本文出自Bin的专栏blog.csdn.net/xbinworld 技术交流QQ群:433250724,欢迎对算法.技术.应用感兴趣的同学加入 双调排序是data-indepen ...

  3. ieee80211 phy1: Failed to select rate control algorithm

    /************************************************************************ * ieee80211 phy1: Failed t ...

  4. ajax向后台请求数据,后台接收到数据并进行了处理,但前台就是调用error方法

    如果你的前台页面书写正确的情况下,并且运行情况和本文题目类似,那不妨试试这个: 在ajax方法中加上:async:false,让ajax同步执行. 因为ajax默认是异步的,至于为什么会不执行succ ...

  5. 《DSP using MATLAB》Problem 2.9

    代码: %% ------------------------------------------------------------------------ %% Output Info about ...

  6. 获取 graphql schema 信息

    模块 npm install -g get-graphql-schema get-graphql-schema GRAPHQL_URL > schema.graphql 简单使用 使用prism ...

  7. highlight.js 设置行号

    原文地址:highlight.js 设置行号 博客地址:http://www.extlight.com 一.背景 笔者在开发这套博客系统时使用 Editormd 作为 Markdown 编辑器,由于不 ...

  8. 3.Appium运行时出现:Original error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device

    参考博客:https://blog.csdn.net/niubitianping/article/details/52624417 1.错误信息:Original error: Android dev ...

  9. LogHelp 日记分天记录,只记30天日记

    using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Tex ...

  10. PLSQL在64位 win7/WIN8上运行(绿色版plsql、无需安装oracle客户端)

    一.准备需要的文件: 1.plsql文件绿色压缩包 2.oracle客户端文件绿色压缩包 二.设置PLSQL 运行plsql,不登陆进入plsql点“工具”-“首选项” 按照如图设置“ oracle主 ...