RedisLabsModules / redex

Extension modules to Redis' native data types and commands
GNU Affero General Public License v3.0
69 stars 13 forks source link

add PREPEND string command #5

Closed neomantra closed 8 years ago

neomantra commented 8 years ago

PREPEND key value Prepends a value to a String key. If key does not exist it is created and set as an empty string, so PREPEND will be similar to SET in this special case. Integer Reply: the length of the string after the prepend operation.

itamarhaber commented 8 years ago

@neomantra Thanks! Reviewing now and definitely liking the functionality that completes the existing APPEND.

BTW, formally "prepend" isn't the opposite of "append" but since everyone uses it that way we're good :sweet_potato: :tomato:

itamarhaber commented 8 years ago

@neomantra ready to merge once the error messages are "conventionalized" - awesome to also get the README update and the unit test :100:

itamarhaber commented 8 years ago

Merged - thanks!