Created
August 20, 2013 19:50
-
-
Save supershabam/6286313 to your computer and use it in GitHub Desktop.
pooldis multi
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
client = pooldis instance | |
var multi = client.multi() | |
var scardPromise = multi.scard("bigset") | |
multi.dbsize() // don't have to capture the promise | |
multi.exec().then(function(values) { | |
// list of values like with node_redis | |
}, function(err) { | |
}) | |
// callback only style | |
var multi = client.multi() | |
multi.scard("bigset", function(err, value) { | |
// executed once exec is run | |
}) | |
multi.dbsize() | |
multi.exec(function(err, replies) { | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment