Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-661

Convert find and aggregate to operations, and make their corresponding methods do immediate I/O

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-rc0
    • Component/s: None
    • Labels:
      None

      Description

      Since we are not providing a fluent API, our find and aggregate methods should perform immediate I/O.

      To accomplish this, we will:

      1. turn these methods into operations which return {{MongoCursor}}s
      2. Introduce a getNextDocument method on MongoCursor which uses mongoc_cursor_next to retrieve the next Document from a cursor. Refactor NextOperation to use this
      3. Introduce a cacheDocument method on MongoCursor which uses getNextDocument to retrieve and cache the next Document. Use this from within FindOperation and AggregateOperation to trigger immediate I/O in those API methods.

      See the design in WRITING-4315 for more details.

        Attachments

          Activity

            People

            Assignee:
            kaitlin.mahar Kaitlin Mahar
            Reporter:
            kaitlin.mahar Kaitlin Mahar
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: