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

Update LINDEX return value to better response #108

Open
hwware opened this issue Feb 21, 2023 · 0 comments
Open

Update LINDEX return value to better response #108

hwware opened this issue Feb 21, 2023 · 0 comments

Comments

@hwware
Copy link
Owner

hwware commented Feb 21, 2023

The problem/use-case that the feature addresses

Current LSET command:

LSET key index element: If key does not exist, return (error) ERR no such key
If key exists, but index out of range return (error) ERR index out of range
If key exists, but type not match, return (error) WRONGTYPE Operation against a key holding the wrong kind of value

We should make the LINDEX has the same return value:

LINDEX key index:

current return value:
If key does not exist, return nil
If key exists, but index out of range, return nil
If key exists, but type not match, return (error) WRONGTYPE Operation against a key holding the wrong kind of value

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

No branches or pull requests

1 participant