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

Allow $type to support "number" as type value

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.1.6
    • 3.1.3
    • Querying
    • None
    • Fully Compatible
    • Quint Iteration 6

    Description

      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) }
      

      Attachments

        Activity

          People

            qingyang.chen Qingyang Chen
            qingyang.chen Qingyang Chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: