Skip to content

Reference to column in find/get methods #618

Open
@mabar

Description

@mabar

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 +

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions