File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3- ## v7 WIP
3+ ## v7
44
5- - Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a transactional pipeline.
5+ - * Important * . Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a transactional pipeline.
66- WrapProcess is replaced with more convenient AddHook that has access to context.Context.
77- WithContext now can not be used to create a shallow copy of the client.
88- New methods ProcessContext, DoContext, and ExecContext.
99- Client respects Context.Deadline when setting net.Conn deadline.
1010- Client listens on Context.Done while waiting for a connection from the pool and returns an error when context context is cancelled.
1111- Add PubSub.ChannelWithSubscriptions that sends ` *Subscription ` in addition to ` *Message ` to allow detecting reconnections.
12- - ` time.Time ` is now marshalled in RFC3339 format. ` rdb.Get("foo").Time() ` helper is added to parse time.
12+ - ` time.Time ` is now marshalled in RFC3339 format. ` rdb.Get("foo").Time() ` helper is added to parse the time.
1313- ` SetLimiter ` is removed and added ` Options.Limiter ` instead.
1414
1515## v6.15
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ func (c *Tx) Unwatch(keys ...string) *StatusCmd {
116116 return cmd
117117}
118118
119+ // Pipeline creates a pipeline. Usually it is more convenient to use Pipelined.
119120func (c * Tx ) Pipeline () Pipeliner {
120121 pipe := Pipeline {
121122 ctx : c .ctx ,
@@ -127,11 +128,13 @@ func (c *Tx) Pipeline() Pipeliner {
127128 return & pipe
128129}
129130
131+ // Pipelined executes commands queued in the fn outside of the transaction.
132+ // Use TxPipelined if you need transactional behavior.
130133func (c * Tx ) Pipelined (fn func (Pipeliner ) error ) ([]Cmder , error ) {
131134 return c .Pipeline ().Pipelined (fn )
132135}
133136
134- // TxPipelined executes commands queued in the fn in a transaction.
137+ // TxPipelined executes commands queued in the fn in the transaction.
135138//
136139// When using WATCH, EXEC will execute commands only if the watched keys
137140// were not modified, allowing for a check-and-set mechanism.
@@ -143,7 +146,7 @@ func (c *Tx) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
143146 return c .TxPipeline ().Pipelined (fn )
144147}
145148
146- // TxPipeline creates a new pipeline. Usually it is more convenient to use TxPipelined.
149+ // TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
147150func (c * Tx ) TxPipeline () Pipeliner {
148151 pipe := Pipeline {
149152 ctx : c .ctx ,
You can’t perform that action at this time.
0 commit comments