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

Implement boolean strict option in search flow #76

Open
mohamadrezapishdad opened this issue Jun 12, 2023 · 0 comments
Open

Implement boolean strict option in search flow #76

mohamadrezapishdad opened this issue Jun 12, 2023 · 0 comments

Comments

@mohamadrezapishdad
Copy link

Current Situation

Currently, when using the JMES search package in PHP, if the provided expression does not match any elements inside the array, the result is returned as null.

Problem

As a developer, this poses an issue because receiving a null value does not provide sufficient information to determine whether the null value is due to the absence of the expression in the data or if the corresponding value in the array is intentionally null.

Desired Situation

It would be beneficial to have a boolean strict option available in the JMES search package. This option would allow developers to indicate that if an expression does not exist in the current data, an exception should be thrown instead of returning a null value. By receiving an exception, developers can easily identify the source of the issue and distinguish between the absence of the expression and intentionally null values in the array.

Expected Benefits

  • Improved Error Handling: The exception will provide clear information about the source of the issue, allowing for easier debugging and error resolution.
  • Accurate Null Value Detection: Developers can differentiate between the absence of an expression and intentional null values in the array, enabling better decision-making based on the search results.

Implementing this boolean strict option will enhance the usability and reliability of the JMES search package in PHP for developers, providing a more informative and predictable search experience.

@mohamadrezapishdad mohamadrezapishdad changed the title Implement boolean strict option for JMES search in PHP Implement boolean strict option in search flow Jun 12, 2023
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