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

MongoCollection::distinct() should return [BsonValue?]

    XMLWordPrintable

    Details

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

      Description

      Per the CRUD spec, the distinct() helper should return Iterable<any> (see: Terms). In the context of the Swift driver, this should probably be an array of optional BsonValue types (i.e. [BsonValue?]).

      Currently, it looks as if the method stuffs the distinct command's response into a synthetic MongoCursor (see: implementation). For reference, we can look to the distinct example in the libmongoc docs.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kaitlin.mahar Kaitlin Mahar
              Reporter:
              jmikola Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: