An Embeddable Datastore Engine |
Tweet |
Follow @Vedis |
Vedis Built-in Commands - Key/Value.
Command
GETSET key value
Description
Atomically sets key to value and returns the old value stored at key. Returns an error when key exists but does not hold a string value.
Return value
Value: The old value stored at key, or null when key does not exist.
Example
Refer to the download page for some C/C++ samples on how to invoke this command from your host application.
vedis> SET test "Hello"
(true)
vedis> GETSET test "World"
Hello
vedis> GET test
World
(true)
vedis> GETSET test "World"
Hello
vedis> GET test
World
Copyright © Symisc Systems