mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-09-27 04:16:06 +08:00
fix: Updating hash value would sometimes replace the entire hash
https://github.com/EchoVault/SugarDB/issues/179
This commit is contained in:
@@ -79,7 +79,7 @@ func handleHSET(params internal.HandlerFuncParams) ([]byte, error) {
|
|||||||
// Handle HSET
|
// Handle HSET
|
||||||
for field, value := range hash {
|
for field, value := range hash {
|
||||||
if entries[field].Value == nil {
|
if entries[field].Value == nil {
|
||||||
entries[field] = HashValue{Value: value}
|
entries[field] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
count = len(entries)
|
count = len(entries)
|
||||||
|
Reference in New Issue
Block a user