Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to redis.mset({a:123,b:345}) if options.keyPrefix was used #217

Closed
garkin opened this issue Dec 19, 2015 · 4 comments
Closed

Fails to redis.mset({a:123,b:345}) if options.keyPrefix was used #217

garkin opened this issue Dec 19, 2015 · 4 comments
Labels

Comments

@garkin
Copy link

garkin commented Dec 19, 2015

Fails to redis.mset({a:123,b:345}) if options.keyPrefix was used.

Before handling keyPrefix#:
image

After handling keyPrefix:
image

@garkin garkin changed the title Fails to redis.mset({a:123,b:345}) if have options.keyPrefix Fails to redis.mset({a:123,b:345}) if options.keyPrefix was used Dec 19, 2015
@AVVS
Copy link
Contributor

AVVS commented Dec 19, 2015

http://redis.io/commands/mset

redis.mset(key, val, key, val), instead you pass an object, it's coerced to string, hence it fails.

as far as I remember object to payload transform is applied on hmset only

@garkin
Copy link
Author

garkin commented Dec 19, 2015

/test/functional/transformer.js#L45

describe('mset', function () {
      it('should support object', function (done) {
        var redis = new Redis();
        redis.mset({ a: 1, b: '2' }, function (err, result) {
          expect(result).to.eql('OK');
          redis.mget('a', 'b', function (err, result) {
            expect(result).to.eql(['1', '2']);
            done();
          });
        });
      });
});

@AVVS
Copy link
Contributor

AVVS commented Dec 19, 2015

then I'm wrong and this is a bug for sure

@luin luin added the bug label Dec 20, 2015
@luin luin closed this as completed in 05a61e1 Dec 20, 2015
@luin
Copy link
Collaborator

luin commented Dec 20, 2015

Fixed in 1.13.1. Thank you for pointing out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants