Update should provide more than $inc $min $max etc.

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying, Write Ops
    • None
    • Query
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      On update you can use functions like $min $max $inc etc. but I think develop applications would be much easier if there were several more.

      e.g.
      $dec: yes you can substract values using $inc with negativ numbers, but that looks not nice, but like a hack. So $dec function to decrement would solve this.

      $avg: I can calc the average of the old and new value just with the aggregation framework or using a count field and divide my value and the count field. There is no chance to do this work on update (min and max use both arguments too. I think it's not hard to implement a mechanism to use some calculation functions on these arguments on update time).

      $div: there is a $mul operator why is there no $div operator to divide numbers?

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Ben [X]
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: