模糊查询

161 阅读1分钟
 db.collection('person').where(_.or([
                  {
                    name:db.RegExp({
                        regexp:e,
                        option:'i'
                    })
                  },
                  {
                    person:db.RegExp({
                        regexp:e,
                        option:'i'
                    })
                  },
                  {
                    location:db.RegExp({
                        regexp:e,
                        option:'i'
                    })
                  }
                ]).and([{
                    del:0
                }])).get()