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 1
1
# Changelog
2
2
3
- ## v7 WIP
3
+ ## v7
4
4
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.
6
6
- WrapProcess is replaced with more convenient AddHook that has access to context.Context.
7
7
- WithContext now can not be used to create a shallow copy of the client.
8
8
- New methods ProcessContext, DoContext, and ExecContext.
9
9
- Client respects Context.Deadline when setting net.Conn deadline.
10
10
- Client listens on Context.Done while waiting for a connection from the pool and returns an error when context context is cancelled.
11
11
- 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.
13
13
- ` SetLimiter ` is removed and added ` Options.Limiter ` instead.
14
14
15
15
## v6.15
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ func (c *Tx) Unwatch(keys ...string) *StatusCmd {
116
116
return cmd
117
117
}
118
118
119
+ // Pipeline creates a pipeline. Usually it is more convenient to use Pipelined.
119
120
func (c * Tx ) Pipeline () Pipeliner {
120
121
pipe := Pipeline {
121
122
ctx : c .ctx ,
@@ -127,11 +128,13 @@ func (c *Tx) Pipeline() Pipeliner {
127
128
return & pipe
128
129
}
129
130
131
+ // Pipelined executes commands queued in the fn outside of the transaction.
132
+ // Use TxPipelined if you need transactional behavior.
130
133
func (c * Tx ) Pipelined (fn func (Pipeliner ) error ) ([]Cmder , error ) {
131
134
return c .Pipeline ().Pipelined (fn )
132
135
}
133
136
134
- // TxPipelined executes commands queued in the fn in a transaction.
137
+ // TxPipelined executes commands queued in the fn in the transaction.
135
138
//
136
139
// When using WATCH, EXEC will execute commands only if the watched keys
137
140
// were not modified, allowing for a check-and-set mechanism.
@@ -143,7 +146,7 @@ func (c *Tx) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
143
146
return c .TxPipeline ().Pipelined (fn )
144
147
}
145
148
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.
147
150
func (c * Tx ) TxPipeline () Pipeliner {
148
151
pipe := Pipeline {
149
152
ctx : c .ctx ,
You can’t perform that action at this time.
0 commit comments