Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshavenger committed Oct 22, 2024
1 parent 0d121f5 commit f846d78
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/src/content/docs/commands/EXISTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ EXISTS key [key ...]

## Behaviour
- The `EXISTS` command checks whether the specified keys are present in the database.
- If one key is specified, the command returns `1` if the key exists and `0` if it does not.
- If multiple keys are specified, the command returns the count of keys that exist among the given keys.
- Returns 1 or 0, or for multiple keys returns the count of existing keys.
- The command performs a read-only operation and does not modify the database.

## Errors
1. **Wrong number of arguments**:
- Error Message: `(error) ERR wrong number of arguments for 'exists' command`
- Occurs when no key is provided.

2. **Invalid key type**:
- Error Message: `(error) ERR value is not a valid string`
- Occurs when a non-string value is provided as a key.
2. **Wrong type of value or key**:
- Error Message: `(error) WRONGTYPE Operation against a key holding the wrong kind of value`
- Occurs when attempting to use the command on a key that contains a non-string value.

## Example Usage

Expand Down

0 comments on commit f846d78

Please sign in to comment.