Allow $type to support "number" as type value

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 3.1.6
    • Affects Version/s: 3.1.3
    • Component/s: Querying
    • None
    • Fully Compatible
    • Quint Iteration 6
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This is an extension to SERVER-18819. We should add a "number" type to $type-supported string names that rolls up all number types.

      Example:

      > db.coll.drop()
      > db.coll.insert({_id: 1, num: NumberInt('123')})
      > db.coll.insert({_id: 2, num: NumberLong('123')})
      
      > db.coll.find({num: {$type: "number"}})
      { "_id" : 1, "num" : 123 }
      { "_id" : 2, "num" : NumberLong(123) }
      

              Assignee:
              Qingyang Chen (Inactive)
              Reporter:
              Qingyang Chen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: