You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
mohamadrezapishdad
changed the title
Implement boolean strict option for JMES search in PHP
Implement boolean strict option in search flow
Jun 12, 2023
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
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.
The text was updated successfully, but these errors were encountered: