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

Converting an array to cursor

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Ubuntu 13.10

      Cursors can be easily converted to arrays using `.toArray(foo)` method:

      var cursor = col.find({});
      cursor.toArray(function (err, itemsArray)

      { /* do something */ }

      );

      But is it possible to convert `itemsArray` in a cursor so I will have all cursor functions?

      var newCursor = foo (itemsArray);
      typeof newCursor.toArray === "function" // true

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            IonicaBizau Ionica Bizau [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: