/man/redisLPush.Rd

http://github.com/bwlewis/rredis · Unknown · 45 lines · 45 code · 0 blank · 0 comment · 0 complexity · 4fbbcea9e729acfc9387ca0a6b5be196 MD5 · raw file

  1. \name{redisLPush}
  2. \alias{redisLPush}
  3. \alias{redisRPush}
  4. \title{Add a value to the head tail of a list.
  5. }
  6. \description{
  7. Add values to the tail (LPush) or head (RPush) of a list
  8. corresponding to the specified key.
  9. }
  10. \usage{
  11. redisLPush(key, value, ...)
  12. }
  13. \arguments{
  14. \item{key}{The desired key corresponding to a list.}
  15. \item{value}{The element to add to the list.}
  16. \item{...}{Optional additional values to add to the list.}
  17. }
  18. \details{
  19. If the key does not exist an empty list is created just before the
  20. append operation. If the key exists but is not a list an error is returned.
  21. }
  22. \value{
  23. The length of the list after the push operation.
  24. }
  25. \references{
  26. http://redis.io/commands
  27. }
  28. \author{
  29. B. W. Lewis
  30. }
  31. \seealso{
  32. \code{\link{redisRPush}}
  33. }
  34. \examples{
  35. \dontrun{
  36. redisConnect()
  37. redisLPush('x',1)
  38. redisLPush('x',2)
  39. redisLPush('x',3)
  40. redisRPush('x',11)
  41. redisRPush('x',21)
  42. redisRPush('x',31)
  43. redisLLen('x')
  44. }
  45. }