Return a new pipeline object that can queue multiple commands for later execution. ``transaction`` indicates whether all commands should be executed atomically. Apart from making a group of operations atomic, pipelines are useful for reducing the back-and-forth overh
(self, transaction=True, shard_hint=None)
| 567 | setattr(self, funcname, func) |
| 568 | |
| 569 | def pipeline(self, transaction=True, shard_hint=None) -> "Pipeline": |
| 570 | """ |
| 571 | Return a new pipeline object that can queue multiple commands for |
| 572 | later execution. ``transaction`` indicates whether all commands |
| 573 | should be executed atomically. Apart from making a group of operations |
| 574 | atomic, pipelines are useful for reducing the back-and-forth overhead |
| 575 | between the client and server. |
| 576 | """ |
| 577 | return Pipeline( |
| 578 | self.connection_pool, self.response_callbacks, transaction, shard_hint |
| 579 | ) |
| 580 | |
| 581 | def transaction( |
| 582 | self, func: Callable[["Pipeline"], None], *watches, **kwargs |