Skip to content

Implement boolean strict option in search flow #76

@mohamadrezapishdad

Description

@mohamadrezapishdad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions