function gethAllCache(id) { return new Promise((resv, rej) => { client.hkeys(id, (err, res) => { resv(res); }) }) }
// 获取哈希表的键 client.hkeys('camping', (err, keys) => { if (err) throw err keys.forEach((key, index) => { console.log(' ' + key) }) })
client.hkeys('hash key', function (err, replies) { console.log(replies.length + ' replies:'); replies.forEach(function (reply, i) { console.log(' ' + i + ': ' + reply); }); client.quit(); });
router.route('/') client.hkeys('cities', function(err, citynames) { if (err) { throw err;
}) client.hkeys('hash key', function (err, replies) { t.error(err) t.strictEqual(replies.length, 2)
client.hkeys("hash-key", function (err, replies) { console.log(replies.length + " replies:"); replies.forEach(function (reply, i) { console.log(" " + i + ": " + reply); }); client.quit(); });
client.hkeys('hash key', function (err, replies) { console.log(replies.length + ' replies:'); replies.forEach(function (reply, i) { console.log(' ' + i + ': ' + reply); }); client.quit(); });
db.hkeys('camping', (err, keys) => { if (err) throw err; keys.forEach(key => console.log(` ${key}`)); });