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

Reference to column in find/get methods #618

Open
mabar opened this issue Apr 12, 2023 · 0 comments
Open

Reference to column in find/get methods #618

mabar opened this issue Apr 12, 2023 · 0 comments
Milestone

Comments

@mabar
Copy link
Contributor

mabar commented Apr 12, 2023

It would be great to be able reference other columns in filtering. I would like something like:

  • 'column1' => new ColumnReference('column2') - column1 = column2
  • 'column1!=' => new ColumnReference('column2') - column1 != column2

Bit problematic are cases like position = rating + 1 . In this case we are limited by operators being written in key:

  • 'position+1' => new ColumnReference('rating') ??

I think best in long-term would be to move comparison from key to value:

  • 'column1' => new ColumnReference('column2') - implicit =
  • 'column1' => new EqualWith(new ColumnReference('column2')) - explicit =
  • 'column1' => new NotEqualWith(new ColumnReference('column2')) - explicit !=
  • 'position' => new Sum(new ColumnReference('rating'), 1) - explicit +
@mabar mabar added the feature label Apr 12, 2023
@hrach hrach added this to the v6.0 milestone Mar 8, 2024
@hrach hrach removed the feature label Oct 1, 2024
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

No branches or pull requests

2 participants