Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19243

Allow $type to support "number" as type value

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

      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 Qingyang Chen
            Reporter:
            qingyang.chen Qingyang Chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: