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

Requesting for feature like repository.exist(key) #235

Open
DhruvinDaveTis opened this issue May 7, 2024 · 1 comment
Open

Requesting for feature like repository.exist(key) #235

DhruvinDaveTis opened this issue May 7, 2024 · 1 comment

Comments

@DhruvinDaveTis
Copy link

I am proposing a new feature for the GitHub Redis-om library, aiming to enhance its capabilities with a repository pattern for fluent chaining methods akin to Laravel's Eloquent. This feature aims to streamline data retrieval from Redis by introducing a repository method for finding data with a fluent chaining syntax, facilitating cleaner and more expressive code. Additionally, I suggest the inclusion of a new method, repository.exist(key), designed to efficiently check the existence of a key within Redis. This method would provide a simple yet powerful means to ascertain whether a specific key exists in the Redis database, aiding in data validation and workflow logic. By integrating these enhancements, the library would offer developers a more intuitive and efficient approach to working with Redis data, aligning with modern development patterns and best practices.

@guyroyse
Copy link
Contributor

guyroyse commented May 7, 2024

I'm down for a PR that adds this method to the repository. A couple of things that I will require:

  1. Please call it .exists as that matches the Node Redis function that does the same thing.
  2. It needs to take EntityIds and not keys. Everything in the Repository works that way. Needs to be consistent.
  3. Model it after the .remove command which takes a single EntityId, multiple EntityIds, or an array of EntityIds.
  4. Be sure to add the comments that generate the docs.

Great idea!

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

2 participants