Make DistinctResult use the Collection's BSONOptions when decoding results

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 2.0.0
    • Affects Version/s: None
    • Component/s: BSON, CRUD
    • None
    • Major Change
    • Go Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Follow-up from https://github.com/mongodb/mongo-go-driver/pull/1603.

      Currently (on the master branch) a DistinctResult does not use the BSONOptions specified on a Collection when unmarshaling results. We should update it to use the specified BSONOptions.

      Depends on GODRIVER-1808 (https://github.com/mongodb/mongo-go-driver/pull/1584)

      Definition of done

      • Update DistinctResult.Decode to use a bson.Decoder configured with BSONOptions to decode the results.

      Pitfalls

            Assignee:
            Preston Vasquez
            Reporter:
            Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: