Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-91

Don't require "yield" to get cursor from aggregate()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.5
    • Affects Version/s: None
    • Component/s: None
    • None

      Instead of this:

      cursor = yield collection.aggregate(pipeline)
      

      This:

      cursor = collection.aggregate(pipeline)
      

      (Substitute "yield from" or "await" for "yield" where appropriate.)

      Implementation: aggregate will now return a "latent" cursor that does no I/O until the first "yield fetch_next", much like a regular query cursor.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: