English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis HSCAN Command

Redis Hashes (Hash)

The Redis HSCAN command is used to iterate over key-value pairs in a hash table.

Syntax

Basic Syntax of redis HSCAN Command

HSCAN key cursor [MATCH pattern] [COUNT count]
  • cursor - Cursor.

  • pattern - Matching pattern.

  • count - Specify how many elements to return from the dataset, the default value is 10 。

Available Versions

>= 2.8.0

Return Value

Each returned element is a tuple, consisting of a field and a value.

Online Examples

> HMSET sites google "google.com" w3codebox "oldtoolbag.com" weibo "weibo.com" 4 "taobao.com"
OK
> HSCAN sites 0 match "run*"
1) "0"
2) 1) "w3codebox"
2) "oldtoolbag.com"

Redis Hashes (Hash)