Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1240

Sort with unordered map type

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.1.0
    • CRUD
    • None

    Description

      The SetSort() option currently accepts an interface{} value.

      But it is incorrect to use an unordered map here, because it could have unexpected behavior.

      I would expect it to return an error (or panic).

       

      The same problem exists for index keys.

       

      The error message should recommend to use bson.A.

      Attachments

        Activity

          People

            divjot.arora@mongodb.com Divjot Arora (Inactive)
            pierrre Pierre Durand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: