Skip to content

Conversation

@ZaidMaslouhi
Copy link

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 #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
Copy link
Author

@zaro

@zaro
Copy link
Member

zaro commented Dec 21, 2024

@ZaidMaslouhi I struggle to understand what is the point of this? There are two places where you change something that is configurable with hardcoded value . What is the purpose of that?

@ZaidMaslouhi
Copy link
Author

@zaro Thank you for the feedback.
You're absolutely right about preserving configurability. I'll revise the PR to:

  1. Add the '&' symbol as an optional delimiter in the configuration rather than hardcoding it
  2. Keep the existing configuration options intact
  3. Update the documentation to explain how to use different delimiters for array values in join conditions

The goal is to solve the array parsing issue while maintaining the library's flexibility.

@ccasado16
Copy link

ccasado16 commented May 6, 2025

Hi dudes, I'm building a rest api using nest js and this fantastic framework, but now I don't know how to stablish some relations, can you help me please?
i know this is not for asking help but i dind't find anything related in other forums
@ZaidMaslouhi @zaro

@ZaidMaslouhi
Copy link
Author

Hello @ccasado16, I suggest that you review the documentation. It covers all the necessary information to create a Rest API using NestJS

@ccasado16
Copy link

Hello @ccasado16, I suggest that you review the documentation. It covers all the necessary information to create a Rest API using NestJS

i need the help of a expert because there are some things i don't understand at all

@zaro
Copy link
Member

zaro commented May 6, 2025

@ccasado16 You can contact me over email : zarrro AT gmail DOT com , and provide mode details what do you need help with.

@ccasado16
Copy link

great, I already wrote you a message @zaro

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)

3 participants