The query streaming functionality is being deprecated. It doesn't make a ton of sense to do this in a stream. In the future, I may implement a higher-level query plugin in the future that implements this but I'm not sure.
What's really needed is just a simpler way to fetch all records. This requires that nforce provides a way for the query method to fetch records recursively until the query limit is hit. A simple way of doing this is by adding a fetchAll argument...
// fetch up to 10,000 records
org.query({ query: 'SELECT Id .... LIMIT 10000', fetchAll: true }, function(err, records){
console.log(records.length); // could be up to 10000 records;
});
// without fetchAll
org.query({ query: 'SELECT Id .... LIMIT 10000' }, function(err, records){
console.log(records.length); // max 2000 records;
});
The query streaming functionality is being deprecated. It doesn't make a ton of sense to do this in a stream. In the future, I may implement a higher-level query plugin in the future that implements this but I'm not sure.
What's really needed is just a simpler way to fetch all records. This requires that nforce provides a way for the query method to fetch records recursively until the query limit is hit. A simple way of doing this is by adding a fetchAll argument...