-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cursors
Currently we support a raw: true option for most operations, indicating that we want to return raw {{Buffer}}s in command responses. This breaks down, however, when it comes to commands that return arbitrarily large cursors. One might expect the following to hold true:
coll.find({ raw: true }).limit(10).toArray((err, docs) => {
expect(docs).to.have.length(10);
});
however, since our Cursor implementation depends on observation of the cursor id, and we never deserialize the document, it will always complete iteration at the first batch.