Comments (3)
Yeah, that sounds like a good idea. Someone already contributed that syntax for HMGET, and it is indeed nicer. If you'd like to contribute an HMSET implementation that works like this, it would certainly get in faster. Otherwise, I'll put it on the list.
from node-redis.
Alright. I tried. Here is the code I borrowed from bnoguchi's redis-node:
RedisClient.prototype.hmset = function (key, hash, callback) {
var args = ["hmset", key];
for (var property in hash) if (hash.hasOwnProperty(property)) {
args.push(property, hash[property]);
};
if (callback) args.push(callback);
this.send_command.apply(this, args);
};
Any Comments?
from node-redis.
This turned out to be a lot more involved than I thought, but I just put this into v0.5.0:
Let me know if it works for you.
from node-redis.
Related Issues (20)
- Offline queue doesn't works when redis server restarting. HOT 5
- redisClient.sAdd() not working by inputting an Array HOT 1
- Redlock support HOT 1
- Changelog HOT 1
- Question: client producing an uncought exception when no listener is attached? HOT 2
- Module not found: Can't resolve 'string_decoder' HOT 1
- 3 socket writes instead of one?
- Cannot read properties of undefined (reading 'replicas') [calling "get"] HOT 1
- Add support for HSCAN [NOVALUES]
- Add command filter for CLIENT KILL to support maximum age via [MAXAGE] option
- Support XREAD, XREADGROUP reading from last message of stream
- Supporting unstable commands
- Does cluster mode support pipeline?
- Unable to use +/- inf at method: zAdd HOT 2
- Create "ensure" method
- quit vs disconnect - flipped behaviour or wrong documentation HOT 1
- isolationPoolOptions have terrible defaults
- createCluster clients don't handle on('error') correctly HOT 2
- "ClientClosedError: The client is closed" error in my TypeScript application redis usage
- Quit is not getting closed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-redis.