MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / LPUSHX

Method LPUSHX

lists.go:527–538  ·  view source on GitHub ↗
(key string, elements ...Value)

Source from the content-addressed store, hash-verified

525}
526
527func (c Client) LPUSHX(key string, elements ...Value) (newLength int64, err error) {
528 for _, element := range elements {
529 err = c.listPush(key, element, Left, Flags{IfAlreadyExists})
530 if err != nil {
531 return newLength, err
532 }
533 }
534
535 newLength, err = c.LLEN(key)
536
537 return
538}
539
540func (c Client) LRANGE(key string, start, stop int64) (elements []ReturnValue, err error) {
541 nodeMap := make(map[string]listNode)

Callers 2

LINSERTMethod · 0.95
TestLBasicsFunction · 0.80

Calls 2

listPushMethod · 0.95
LLENMethod · 0.95

Tested by 1

TestLBasicsFunction · 0.64