create an expression to test if expression type is numerical

XMLWordPrintableJSON

    • Fully Compatible
    • Query 2019-07-29, Query 2019-08-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently to determine if type of expression is a number you have to do this:

      {$in:[ {$type:"$expression"}, ["int", "long", "double", "decimal"] ]}
      

      It would be nice to have shorthand syntax for this test. Maybe $isNumeric or $isNumber?

      Note that query/matcher already supports {a:{$type:"number"}} but not agg.

            Assignee:
            George Wangensteen (Inactive)
            Reporter:
            Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: