Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2171

Why is a cursor returned instead of directly the result?

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.2
    • Component/s: MongoDB 3.4
    • Labels:
    • Environment:
      Windows10
      NodeJS 12.10.0

      I would expect that on a find the result is returned instead of a "cursor"

      Returns cursor (expected the result)

      find({MTYPE: "CONVEYOR"}) 
      

      Returns result (after converting to array first!)

      find({
              MTYPE: "CONVEYOR" 
          }).toArray((err, result) => {
              if (err) throw err;
              console.log(result);
          });
      

      Why is this?

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            s.sierdsma@gmail.com Sander Sierdsma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: