Created
August 2, 2010 01:05
-
-
Save matthewford/503966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6ce245386ef213c903fcb5fb9b1ba7a6d0c7ee6d Mon Sep 17 00:00:00 2001 | |
From: Matthew Ford <matt@bitzesty.com> | |
Date: Sun, 1 Aug 2010 18:03:20 -0700 | |
Subject: [PATCH] update zinter and zunion to zinterstore and zunionstore | |
--- | |
lib/redis-client.js | 4 ++-- | |
test/test.js | 4 ++-- | |
2 files changed, 4 insertions(+), 4 deletions(-) | |
diff --git a/lib/redis-client.js b/lib/redis-client.js | |
index 13168b1..97f0ca0 100644 | |
--- a/lib/redis-client.js | |
+++ b/lib/redis-client.js | |
@@ -631,7 +631,7 @@ var commands = [ | |
"zcard", | |
"zcount", | |
"zincrby", | |
- "zinter", | |
+ "zinterstore", | |
"zrange", | |
"zrangebyscore", | |
"zrank", | |
@@ -642,7 +642,7 @@ var commands = [ | |
"zrevrange", | |
"zrevrank", | |
"zscore", | |
- "zunion", | |
+ "zunionstore", | |
]; | |
// For internal use but maybe useful in rare cases or when the client command | |
diff --git a/test/test.js b/test/test.js | |
index c73bd06..3205e2b 100755 | |
--- a/test/test.js | |
+++ b/test/test.js | |
@@ -1330,7 +1330,7 @@ function testZINTER() { | |
client.zadd('z0', 1, 'a', expectNumber(1, "testZINTER")); | |
client.zadd('z0', 2, 'b', expectNumber(1, "testZINTER")); | |
client.zadd('z1', 3, 'a', expectNumber(1, "testZINTER")); | |
- client.zinter('z2', 2, 'z0', 'z1', 'AGGREGATE', 'SUM', expectNumber(1, "testZINTER")); | |
+ client.zinterstore('z2', 2, 'z0', 'z1', 'AGGREGATE', 'SUM', expectNumber(1, "testZINTER")); | |
client.zrange('z2', 0, -1, 'WITHSCORES', function (err, members) { | |
if (err) assert.fail(err, "testZINTER"); | |
redisclient.convertMultiBulkBuffersToUTF8Strings(members); | |
@@ -1342,7 +1342,7 @@ function testZUNION() { | |
client.zadd('z0', 1, 'a', expectNumber(1, "testZUNION")); | |
client.zadd('z0', 2, 'b', expectNumber(1, "testZUNION")); | |
client.zadd('z1', 3, 'a', expectNumber(1, "testZUNION")); | |
- client.zunion('z2', 2, 'z0', 'z1', 'AGGREGATE', 'SUM', expectNumber(2, "testZUNION")); | |
+ client.zunionstore('z2', 2, 'z0', 'z1', 'AGGREGATE', 'SUM', expectNumber(2, "testZUNION")); | |
client.zrange('z2', 0, -1, 'WITHSCORES', function (err, members) { | |
if (err) assert.fail(err, "testZUNION"); | |
redisclient.convertMultiBulkBuffersToUTF8Strings(members); | |
-- | |
1.7.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment