Skip to content

feat: add Hash data type (HSET, HGET, HGETALL, HDEL, HEXISTS, HLEN) #2

Description

@zulerne

Hash is the most commonly used Redis type after strings and lists. Needed for the messenger project (user sessions, metadata storage).

Commands

  • HSET <key> <field> <value> [field value ...]
  • HGET <key> <field>
  • HGETALL <key>
  • HDEL <key> <field> [field ...]
  • HEXISTS <key> <field>
  • HLEN <key>

Implementation

  • New TypeHash DataType = "hash" in store
  • Store value as map[string]string
  • New internal/commands/hash.go for handlers
  • Tests in internal/store/store_test.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions