New commands: HSET and HGET (Redis v2.0-dev). NOTE: this is the beginning of the Hashes awesomeness in Redis!

This commit is contained in:
Daniele Alessandri
2010-03-06 09:30:37 +01:00
parent c06f9e34bf
commit c6f97a7946
+15
View File
@@ -1107,6 +1107,12 @@ class RedisServer_vNext extends RedisServer_v1_2 {
'zsetCount' => '\Predis\Commands\ZSetCount',
'zrank' => '\Predis\Commands\ZSetRank',
'zsetRank' => '\Predis\Commands\ZSetRank',
/* commands operating on hashes */
'hset' => '\Predis\Commands\HSet',
'hashSet' => '\Predis\Commands\HSet',
'hget' => '\Predis\Commands\HGet',
'hashGet' => '\Predis\Commands\HGet',
));
}
}
@@ -1506,6 +1512,15 @@ class ZSetRank extends \Predis\InlineCommand {
public function getCommandId() { return 'ZRANK'; }
}
/* commands operating on hashes */
class HSet extends \Predis\MultiBulkCommand {
public function getCommandId() { return 'HSET'; }
}
class HGet extends \Predis\BulkCommand {
public function getCommandId() { return 'HGET'; }
}
/* multiple databases handling commands */
class SelectDatabase extends \Predis\InlineCommand {
public function canBeHashed() { return false; }