Skip to content

Commit ff55c8b

Browse files
committed
Add PFMERGE command
1 parent c853365 commit ff55c8b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Redis.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,6 +3160,22 @@ public function pfAdd( $key, array $elements ) {}
31603160
* $redis->pfCount(array('key1', 'key2')); // int(3)
31613161
*/
31623162
public function pfCount( $key ) {}
3163+
3164+
/**
3165+
* Merge multiple HyperLogLog values into an unique value that will approximate the cardinality
3166+
* of the union of the observed Sets of the source HyperLogLog structures.
3167+
* @param string $destkey
3168+
* @param array $sourcekeys
3169+
* @return bool
3170+
* @link http://redis.io/commands/pfmerge
3171+
* @example
3172+
* <pre>
3173+
* $redis->pfAdd('key1', array('elem1', 'elem2'));
3174+
* $redis->pfAdd('key2', array('elem3', 'elem2'));
3175+
* $redis->pfMerge('key3', array('key1', 'key2'));
3176+
* $redis->pfCount('key3'); // int(3)
3177+
*/
3178+
public function pfMerge( $destkey, array $sourcekeys ) {}
31633179
}
31643180

31653181
class RedisException extends Exception {}

0 commit comments

Comments
 (0)