The decrement methods reduce the value of a given key if the corresponding value can be parsed to an integer value. These operations are provided at a protocol level to eliminate the need to get, update, and reset a simple integer value in the database. All the Python Client Library methods support the use of an explicit offset value that will be used to reduce the stored value in the database.
|Description||Decrement the value of an existing numeric key. The Couchbase Server stores numbers as unsigned values. Therefore the lowest you can decrement is to zero.|
|Document ID used to identify the value|
|Integer offset value to increment/decrement (default 1)|
|Value to be stored if key does not already exist|
|Expiry time for key. Values larger than 30*24*60*60 seconds (30 days) are interpreted as absolute times (from the epoch).|
The first form of the
accepts the keyname and offset value to be used when reducing the
server-side integer. For example, to decrement the server integer
dlcounter by 5:
The return value is the updated value of the specified key.