Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

mongoose get all documents big

var query = templateData.find({}).stream();
query.on('data', function (doc) {
    // do something with the mongoose document
}).on('error', function (err) {
    // handle the error
}).on('close', function () {
    // the stream is closed
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #documents #big
ADD COMMENT
Topic
Name
4+1 =