return latent cursor by default, support simplest possible syntax

    • Type: Epic
    • Resolution: Done
    • Priority: Major - P3
    • 0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • aggregate() improvements
    • Done
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Motor with Tornado currently requires:

      cursor = yield collection.aggregate(pipeline, cursor={})
      while (yield cursor.fetch_next):
          doc = cursor.next_object()
      

      In asyncio, the same with "yield from". This should be possible instead:

      cursor = collection.aggregate(pipeline)
      while (yield cursor.fetch_next):
          doc = cursor.next_object()
      

      Same in asyncio, again with "yield from".

      In Python 3.5, using asyncio or Tornado:

      async for doc in collection.aggregate(pipeline):
          pass
      

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

                Created:
                Updated:
                Resolved:
                None
                None
                None
                None
                None