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

Method LPUSH

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

Source from the content-addressed store, hash-verified

390}
391
392func (c Client) LPUSH(key string, elements ...Value) (newLength int64, err error) {
393 for _, element := range elements {
394 err = c.listPush(key, element, Left, Flags{})
395 if err != nil {
396 return newLength, err
397 }
398 }
399
400 newLength, err = c.LLEN(key)
401
402 return
403}
404
405func (c Client) listPush(key string, element Value, side LSide, flags Flags) error {
406 transactionItems, err := c.listPushActions(key, element, side, flags)

Callers 1

TestLBasicsFunction · 0.80

Calls 2

listPushMethod · 0.95
LLENMethod · 0.95

Tested by 1

TestLBasicsFunction · 0.64