Lower/Upper limit for $inc

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.5.1
    • Component/s: Querying
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I can't believe this hasn't come up yet, I have Google searched for this but couldn't find anything.

      I had a case recently where, while maintaining counters, I wanted an atomic way to ensure that a counter could not pass below 0. Of course currently I have just implemented this in the client side but it would be good to have a server-side edition of this me thinks.

              Assignee:
              Unassigned
              Reporter:
              Sam Millman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: