Unwatch flushes all the previously watched keys for a transaction.
(ctx context.Context, keys ...string)
| 119 | |
| 120 | // Unwatch flushes all the previously watched keys for a transaction. |
| 121 | func (c *Tx) Unwatch(ctx context.Context, keys ...string) *StatusCmd { |
| 122 | args := make([]interface{}, 1+len(keys)) |
| 123 | args[0] = "unwatch" |
| 124 | for i, key := range keys { |
| 125 | args[1+i] = key |
| 126 | } |
| 127 | cmd := NewStatusCmd(ctx, args...) |
| 128 | _ = c.Process(ctx, cmd) |
| 129 | // The watched keys have been released, so Close need not UNWATCH again. |
| 130 | if cmd.Err() == nil { |
| 131 | c.watchArmed = false |
| 132 | } |
| 133 | return cmd |
| 134 | } |
| 135 | |
| 136 | // Pipeline creates a pipeline. Usually it is more convenient to use Pipelined. |
| 137 | func (c *Tx) Pipeline() Pipeliner { |
no test coverage detected