Skip to content

Commit

Permalink
Resolved conflict in cmd_exists.go
Browse files Browse the repository at this point in the history
  • Loading branch information
n4vxn committed Feb 7, 2025
1 parent 9ff7aa9 commit e0176b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cmd/cmd_exists.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var cEXISTS = &DiceDBCommand{
Name: "EXISTS",
HelpShort: "Returns the number of keys existing in the db",
HelpShort: "Returns the count of keys that exist among the given arguments without modifying them",
Eval: evalEXISTS,
}

Expand All @@ -22,7 +22,8 @@ func evalEXISTS(c *Cmd, s *dstore.Store) (*CmdRes, error) {

var count int64
for _, key := range c.C.Args {
// Check if the key exists in the store
// GetNoTouch is used to check if a key exists in the store
// without updating its last access time.
if s.GetNoTouch(key) != nil {
count++
}
Expand Down

0 comments on commit e0176b8

Please sign in to comment.