Symisc Vedis

An Embeddable Datastore Engine



Vedis Built-in Commands - Key/Value.

Command

INCR key


Description


Increments 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 increment


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> INCR test
26

vedis> GET test
26





Symisc Systems
Copyright © Symisc Systems