redisLPush: Add a value to the head tail of a list.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/listCMD.R

Description

Add values to the tail (LPush) or head (RPush) of a list corresponding to the specified key.

Usage

1
redisLPush(key, value, ...)

Arguments

key

The desired key corresponding to a list.

value

The element to add to the list.

...

Optional additional values to add to the list.

Details

If the key does not exist an empty list is created just before the append operation. If the key exists but is not a list an error is returned.

Value

The length of the list after the push operation.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisRPush

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
redisConnect()
redisLPush('x',1)
redisLPush('x',2)
redisLPush('x',3)
redisRPush('x',11)
redisRPush('x',21)
redisRPush('x',31)
redisLLen('x')

## End(Not run)

bwlewis/rredis documentation built on Jan. 3, 2022, 4:53 p.m.