/man/redisHIncrBy.Rd

http://github.com/bwlewis/rredis · Unknown · 44 lines · 43 code · 1 blank · 0 comment · 0 complexity · 9dd25e68eef2f747742fb985fb0d381c MD5 · raw file

  1. \name{redisHIncrBy}
  2. \alias{redisHIncrBy}
  3. \alias{redisHIncrByFloat}
  4. \title{Increment a value.}
  5. \description{Increment the value corresponding to the given key/field
  6. combination by the specified value.
  7. }
  8. \usage{
  9. redisHIncrBy(key, field, value, ...)
  10. }
  11. \arguments{
  12. \item{key}{A key name.}
  13. \item{field}{A field name.}
  14. \item{value}{The value to increment by (integer, numeric, or character).}
  15. \item{...}{ Optional additional arguments. Specify \code{raw=TRUE} to skip de-serialization of the data.}
  16. }
  17. \details{
  18. The value should be an integer
  19. (\code{redisHIncrBy}) or a numeric value (\code{redisHIncrByFloat}).
  20. If the key/field value does not exist or contains a
  21. value of a wrong type, set the
  22. key to the value of "0" before to perform the operation.
  23. }
  24. \value{
  25. The new value of key after the increment, returned as a character
  26. string.
  27. }
  28. \references{
  29. http://redis.io/commands
  30. }
  31. \author{
  32. B. W. Lewis
  33. }
  34. \seealso{
  35. \code{\link{redisHSet}}
  36. }
  37. \examples{
  38. \dontrun{
  39. # Note initial value must be a raw character string!
  40. redisHSet('A','x',charToRaw('5'))
  41. redisHIncrBy('A','x',3)
  42. }
  43. }