如何将整个查询传递给mongoose

时间:2017-05-18 19:07:56

标签: node.js mongoose

我有这样的事情:

var query = collection.find(whole_query); //this came like {whole_query}
        query.exec(function (err, docs) {
            if(err) console.log(err);

            docs.forEach(function (item) {
                console.log(item);
            });

mongoose只做:db.collection.find({})没有var'whole_query':c

感谢您的帮助:)

0 个答案:

没有答案