1.

Cursors returned from aggregation only supports cursor methods like ________________(a) cursor.hasNext()(b) cursor.Next()(c) cursor.has()(d) all of the mentionedI have been asked this question in a job interview.Question is from Aggregation Pipeline topic in chapter Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Right CHOICE is (a) CURSOR.hasNext()

The explanation: cursor.hasNext() returns true if the cursor RETURNED by the db.collection.find() query can ITERATE further to return more documents.



Discussion

No Comment Found

Related InterviewSolutions