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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: