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

Method TxPipelined

tx.go:161–163  ·  view source on GitHub ↗

TxPipelined executes commands queued in the fn in the transaction. When using WATCH, EXEC will execute commands only if the watched keys were not modified, allowing for a check-and-set mechanism. Exec always returns list of commands. If transaction fails TxFailedErr is returned. Otherwise Exec ret

(ctx context.Context, fn func(Pipeliner) error)

Source from the content-addressed store, hash-verified

159// TxFailedErr is returned. Otherwise Exec returns an error of the first
160// failed command or nil.
161func (c *Tx) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) {
162 return c.TxPipeline().Pipelined(ctx, fn)
163}
164
165// TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
166func (c *Tx) TxPipeline() Pipeliner {

Callers

nothing calls this directly

Calls 2

TxPipelineMethod · 0.95
PipelinedMethod · 0.65

Tested by

no test coverage detected