Files
redis-docs/docs/LsetCommand.rst
Kenneth Reitz 525e9fd3d3 all into sphinx
2011-04-06 13:27:48 -04:00

26 lines
955 B
ReStructuredText
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
`|Redis Documentation| <index.html>`_
**LsetCommand: Contents**
  `LSET \_key\_ \_index\_ \_value\_ <#LSET%20_key_%20_index_%20_value_>`_
    `Return value <#Return%20value>`_
LsetCommand
===========
#sidebar `ListCommandsSidebar <ListCommandsSidebar.html>`_
LSET \_key\_ \_index\_ \_value\_
================================
*Time complexity: O(N) (with N being the length of the list)*
Set the list element at *index* (see LINDEX for information about
the\_index\_ argument) with the new *value*. Out of range indexes
willgenerate an error. Note that setting the first or last elements
ofthe list is O(1).
Similarly to other list commands accepting indexes, the index can
be negative to access elements starting from the end of the list.
So -1 is the last element, -2 is the penultimate, and so forth.
Return value
------------
`Status code reply <ReplyTypes.html>`_
.. |Redis Documentation| image:: redis.png