`
wang_peng1
  • 浏览: 3910990 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

或者和并且

 
阅读更多
case1 OR ( [case2 AND case3] OR [case4 AND case5] )

You can try to use the $or operator:

db.hg19_refgene_47.find({
  $or: [
    "_id.c" : 1,
    {
      "_id.p" : {"$gte" : 96978}, 
      "_id.ep" : {"$lte" : 103632}
    },
    {
      "_id.p" : {"$gte" : 96978}, 
      "_id.ep" : {"$lte" : 103632}
    },
    {
      "_id.p" : {"$gte" : 96978}, 
      "_id.ep" : {"$lte" : 103632}
    }
  ]
})

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics