Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement more Hash apis. #26

Open
bigboss2063 opened this issue Jul 15, 2023 · 1 comment
Open

Implement more Hash apis. #26

bigboss2063 opened this issue Jul 15, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@bigboss2063
Copy link
Collaborator

bigboss2063 commented Jul 15, 2023

The Hash structure already supports some commonly used APIs, like HSet, HGet, etc. You can implement more apis for it.

API Explanation assigned done
HSET key field value Set the value of a field in a hash. @bigboss2063
HGET key field Get the value of a field in a hash. @bigboss2063
HMSET key field value [field value ...] Set multiple fields and values in a hash. @bigboss2063
HMGET key field [field ...] Get the values of one or more fields in a hash. @bigboss2063
HDEL key field [field ...] Delete one or more fields from a hash. @bigboss2063
HEXISTS key field Check if a field exists in a hash. @bigboss2063
HGetAll key Get all the fileds and the values in a hash. @bigboss2063
HLEN key Get the number of fields in a hash. @99HU
HKEYS key Get all the field names in a hash. @99HU
HVALS key Get all the values in a hash. @99HU
HStrLen key field Get the length of value of a field in a hash @99HU

Anyone who wants to implement other api is welcome to comment below!

现在 Hash 数据结构已经实现了一些常用的接口,比如 HSet、HGet 等等。可以为它实现更多的接口。

指令 解释 承接人 是否完成
HSET key field value 设置哈希表中字段的值。 @bigboss2063
HGET key field 获取哈希表中字段的值。 @bigboss2063
HMSET key field value [field value ...] 同时设置哈希表中多个字段的值。 @bigboss2063
HMGET key field [field ...] 获取哈希表中一个或多个字段的值。 @bigboss2063
HDEL key field [field ...] 删除哈希表中一个或多个字段。 @bigboss2063
HEXISTS key field 检查哈希表中是否存在指定的字段。 @bigboss2063
HGetAll key 获取哈希表中的所有字段和值。 @bigboss2063
HLEN key 获取哈希表中字段的数量 @99HU
HKEYS key 获取哈希表中所有字段。 @99HU
HVALS key 获取哈希表中所有字段的值 @99HU
HStrLen key field 获取哈希表中字段的值对应的长度 @99HU

还有想实现其他接口的朋友欢迎在下面评论出来!

@bigboss2063 bigboss2063 added the good first issue Good for newcomers label Jul 15, 2023
@99HU
Copy link
Contributor

99HU commented Jul 23, 2023

I Iintend to implement these commands:
HLEN、HKEYS 、HVALS、HVALS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants