Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Aug 9, 2025

This pull request introduces several improvements and refactors to the DotPathQL library, focusing on simplifying the API, unifying the internal path handling logic, and enhancing usability. The main changes include consolidating filter and exclude logic under a common base class, updating method names for clarity, and adding support for default exclude paths. The documentation and tests have also been updated to reflect these changes.

API and Internal Refactoring

  • Unified the filter and exclude logic by introducing a new PathCommon base class, replacing separate PathFilter and PathExclude references in DotPathQL with PathCommon instances, and standardizing the internal method names to run and execute for both filtering and exclusion operations. (src/main/java/io/github/trackerforce/DotPathQL.java, src/main/java/io/github/trackerforce/PathCommon.java, [1] [2] [3] [4] [5] [6]

Default Path Management

  • Added support for default exclude paths via the new addDefaultExcludePaths method in DotPathQL, allowing users to specify paths that are always excluded in exclusion operations, similar to the existing default filter paths. (src/main/java/io/github/trackerforce/DotPathQL.java, src/main/java/io/github/trackerforce/DotPathQL.javaL111-R120)
  • Updated the internal logic so both filter and exclude operations prepend their respective default paths to the user-provided paths, ensuring consistent behavior. (src/main/java/io/github/trackerforce/PathCommon.java, [1] [2] [3]

Documentation Updates

  • Revised the README.md to clarify the behavior of private field access, update code examples to use the simplified API, document the new helper utilities, and specify supported data structures more clearly. (README.md, [1] [2] [3] [4] [5] [6]

Testing Enhancements

  • Added and updated tests to verify the new default exclude paths functionality and ensure correct results when default paths are used for both filtering and exclusion. (src/test/java/io/github/trackerforce/ExcludeTypeClassRecordTest.java, src/test/java/io/github/trackerforce/FilterTypeClassRecordTest.java, [1] [2]

Version Bump

  • Updated the project version to 1.1.0-SNAPSHOT to reflect these feature additions and API changes. (pom.xml, pom.xmlL9-R9)

@petruki petruki self-assigned this Aug 9, 2025
@petruki petruki merged commit 3c6447b into master Aug 9, 2025
4 checks passed
@petruki petruki deleted the staging branch August 9, 2025 21:44
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

Successfully merging this pull request may close these issues.

2 participants