MCPcopy
hub / github.com/redis/go-redis / ARMGet

Method ARMGet

array_commands.go:119–129  ·  view source on GitHub ↗

ARMGet gets values at multiple indexes in an array. Returns values at the specified indexes, with nil for unset indexes.

(ctx context.Context, key string, indexes ...uint64)

Source from the content-addressed store, hash-verified

117// ARMGet gets values at multiple indexes in an array.
118// Returns values at the specified indexes, with nil for unset indexes.
119func (c cmdable) ARMGet(ctx context.Context, key string, indexes ...uint64) *SliceCmd {
120 args := make([]any, 2+len(indexes))
121 args[0] = "armget"
122 args[1] = key
123 for i, idx := range indexes {
124 args[2+i] = idx
125 }
126 cmd := NewSliceCmd(ctx, args...)
127 _ = c(ctx, cmd)
128 return cmd
129}
130
131// ARMSet sets multiple index-value pairs in an array.
132// Returns the number of new slots that were set (previously empty).

Callers

nothing calls this directly

Calls 1

NewSliceCmdFunction · 0.85

Tested by

no test coverage detected