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

Improve Join Condition Parsing for Complex Queries #2

Merged
merged 7 commits into from
Dec 6, 2024
Merged

Conversation

ZaidMaslouhi
Copy link
Owner

@ZaidMaslouhi ZaidMaslouhi commented Dec 6, 2024

Description

Enhance the join condition parsing mechanism to support more complex query scenarios, particularly those involving array-like values such as date ranges.

Key Changes

  • Modified join condition parsing to use '&' as a delimiter
  • Implemented robust handling of array values in join conditions
  • Updated documentation to reflect new parsing approach
  • Added comprehensive test coverage

Detailed Improvements

  1. Parsing Mechanism

    • Replaced existing query string parsing approach
    • Introduced '&' symbol as a new delimiter for join conditions
    • Improved support for array values in on clauses
  2. Testing

    • Added new test cases covering join conditions with array values
    • Verified parsing of complex query strings, including date range examples
  3. Documentation

    • Updated documentation to explain new join condition syntax
    • Provided clear examples of using join conditions with array values

Example Usage

# New syntax for join conditions with array values
join[]=events||id,name||on[0]=event.status||$eq||active&on[1]=event.date||$between||16-12-2023,23-12-2023

Impact

  • Increased flexibility in constructing complex join conditions
  • Better support for range-based and multi-value filters
  • More intuitive query string parsing

Related Issues

Closes gid-oss#68 (if applicable)

Type of Changes

  • Bug Fix
  • Query String Parsing Improvement
  • Documentation Update

Testing

  • Comprehensive test suite added
  • Verified parsing of various join condition scenarios

@ZaidMaslouhi ZaidMaslouhi merged commit a4d2b96 into master Dec 6, 2024
1 of 2 checks passed
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.

Join Condition Parsing Fails for Array Values (e.g. Date Ranges)
1 participant