11import six
22import redis
33from redis import Redis , RedisError
4+ from redis .client import Pipeline
45from redis .client import bool_ok
56from redis ._compat import (long , nativestr )
67from redis .exceptions import DataError
@@ -192,7 +193,6 @@ def appendBucketSize(params, bucket_size):
192193 params .extend (['BUCKETSIZE' , bucket_size ])
193194
194195################## Bloom Filter Functions ######################
195-
196196 def bfCreate (self , key , errorRate , capacity , expansion = None , noScale = None ):
197197 """
198198 Creates a new Bloom Filter ``key`` with desired probability of false
@@ -502,3 +502,21 @@ def topkInfo(self, key):
502502
503503 return self .execute_command (self .TOPK_INFO , key )
504504
505+ def pipeline (self , transaction = True , shard_hint = None ):
506+ """
507+ Return a new pipeline object that can queue multiple commands for
508+ later execution. ``transaction`` indicates whether all commands
509+ should be executed atomically. Apart from making a group of operations
510+ atomic, pipelines are useful for reducing the back-and-forth overhead
511+ between the client and server.
512+ Overridden in order to provide the right client through the pipeline.
513+ """
514+ p = Pipeline (
515+ connection_pool = self .connection_pool ,
516+ response_callbacks = self .response_callbacks ,
517+ transaction = transaction ,
518+ shard_hint = shard_hint )
519+ return p
520+
521+ class Pipeline (Pipeline , Client ):
522+ "Pipeline for RedisBloom Client"
0 commit comments