An Embeddable Datastore Engine |
Tweet |
Follow @Vedis |
Vedis Built-in Commands - Key/Value.
Command
DECR key
Description
Decrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer. This operation is limited to 64 bit signed integers.
Return value
Integer: The value of key after the decrement
Example
Refer to the download page for some C/C++ samples on how to invoke this command from your host application.
vedis> SET test 25
true
vedis> DECR test
24
vedis> GET test
24
true
vedis> DECR test
24
vedis> GET test
24
Copyright © Symisc Systems