Skip to content

hMGet feature request, make second argument optional #263

@titpetric

Description

@titpetric

I'd like to see the hMGet($key, $array_of_hash_keys) have the second argument be optional:

  • Warning: Redis::hMget() expects exactly 2 parameters, 1 given

Skipping it would return all defined hash key/values as an associative array.

IE:

$redis->hMSet("test", "a", "test:1");
$redis->hMSet("test", "b", 1);
var_dump( $redis->hMGet("test") );

// expected return

array(2) {
["a"]=>
string(6) "test:1"
["b"]=>
int(1)
}

I know a workaround would be to use serialization and get/set, but I'd like to avoid fetching the complete data set in many cases, but not all.

Might have to file this under redis-server :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions