1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

mongdb - move projection into find pipeline (#697)

new node.js client API moved projection into options object - switched to pipeline stage instead #695
This commit is contained in:
Ross Cruickshank 2020-10-05 09:28:58 +01:00 committed by GitHub
parent 4ae0818a4b
commit 9cc61cb0f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ module.exports = function(RED) {
skip = 0;
}
coll.find(selector,msg.projection).sort(msg.sort).limit(limit).skip(skip).toArray(function(err, items) {
coll.find(selector).project(msg.projection).sort(msg.sort).limit(limit).skip(skip).toArray(function(err, items) {
if (err) {
node.error(err);
}