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

Join clause of lookups should support predicates #467

Open
Seddryck opened this issue Mar 26, 2019 · 0 comments
Open

Join clause of lookups should support predicates #467

Seddryck opened this issue Mar 26, 2019 · 0 comments
Milestone

Comments

@Seddryck
Copy link
Owner

Seddryck commented Mar 26, 2019

At the moment, it's possible to define the join clause of a lookup operator as a mapping or using. These two conditions support the equality between a column from the candidate table and a column of the reference table. It's possible to define several columns mapping or using to specify that multiple equalities between columns are required.

It would be convenient to let the user define a more generic condition than just equality. The predicate is especially suited for this.

The following syntax could be used

<join>
  <predicate operand="any-column-from-candidate-table">
    <greater-than>[any-column-from-reference-table]</greater-than>
  </predicate>
</join>

Combination of predicates could also be used.

<join>
  <combination operator="and">
    <predicate operand="any-column-from-candidate-table">
      <greater-than>[any-column-from-reference-table]</greater-than>
    </predicate>
    <predicate operand="any-column-from-candidate-table">
      <less-than>[any-other-column-from-reference-table]</less-than>
    </predicate>
  </combination>
</join>

This feature is relying on the implementation of #472

@Seddryck Seddryck added this to the v1.21 milestone Mar 26, 2019
@Seddryck Seddryck modified the milestones: v1.21, v1.22 May 30, 2019
@Seddryck Seddryck modified the milestones: v1.22, v1.23 Jan 5, 2020
@Seddryck Seddryck modified the milestones: v1.23, v1.24 Jan 23, 2021
@Seddryck Seddryck modified the milestones: v1.24, v2.1 Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant