HLEN
Synopsis
HLEN key
This command fetches the number of fields in the hash that is associated with the given key
.
- If the
key
does not exist, 0 is returned. - If the
key
is associated with non-hash data, an error is raised.
Return value
Returns number of fields in the specified hash.
Examples
$ HSET yugahash area1 "Africa"
1
$ HSET yugahash area2 "America"
1
$ HLEN yugahash
2
See also
hdel
, hexists
, hget
, hgetall
, hkeys
, hmget
, hmset
, hset
, hincrby
, hstrlen
, hvals
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .