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

Method listPop

lists.go:349–364  ·  view source on GitHub ↗
(key string, side LSide)

Source from the content-addressed store, hash-verified

347}
348
349func (c Client) listPop(key string, side LSide) (element ReturnValue, ok bool, err error) {
350 element, transactItems, ok, err := c.listPopActions(key, side)
351 if err != nil || !ok {
352 return
353 }
354
355 _, err = c.ddbClient.TransactWriteItemsRequest(&dynamodb.TransactWriteItemsInput{
356 TransactItems: transactItems,
357 }).Send(context.TODO())
358
359 if err != nil {
360 return element, ok, err
361 }
362
363 return element, true, nil
364}
365
366func (c Client) listPopActions(key string, side LSide) (element ReturnValue, actions []dynamodb.TransactWriteItem, ok bool, err error) {
367 endNode, ok, err := c.listFindEnd(key, side)

Callers 3

LPOPMethod · 0.95
LREMMethod · 0.95
RPOPMethod · 0.95

Calls 1

listPopActionsMethod · 0.95

Tested by

no test coverage detected