1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-01 16:46:54 +03:00
Files
node-redis/examples/subqueries.js
Ruben Bridgewater 7922d4eb85 Small style changes
2015-10-07 16:34:41 +02:00

18 lines
471 B
JavaScript

'use strict';
// Sending commands in response to other commands.
// This example runs 'type' against every key in the database
//
var client = require('redis').createClient();
client.keys('*', function (err, keys) {
keys.forEach(function (key, pos) {
client.type(key, function (err, keytype) {
console.log(key + ' is ' + keytype);
if (pos === (keys.length - 1)) {
client.quit();
}
});
});
});