Commit 8c44a276 authored by shajiaiming's avatar shajiaiming

获取hash数据

parent 495f90f1
...@@ -59,6 +59,13 @@ trait TraitYiiHashTable ...@@ -59,6 +59,13 @@ trait TraitYiiHashTable
return Yii::$app->redis->hset($table, $key, $value); return Yii::$app->redis->hset($table, $key, $value);
} }
public static function getHashDataByTable($table, $cursor = 0, $match = null, $pattern = null, $count = 0)
{
self::checkTable(self::DB_NAME, $table);
$table = self::getHashTable(self::DB_NAME, $table);
return Yii::$app->redis->hscan($table, $cursor/*, $match, $pattern, $count*/);
}
private static function checkTable($db_name, $table) private static function checkTable($db_name, $table)
{ {
DefaultBaseImpl::checkTable($db_name, $table); DefaultBaseImpl::checkTable($db_name, $table);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment