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

Comparing data between two fields rather than using hardcoded values #155

Open
alirezanet opened this issue Feb 23, 2024 Discussed in #153 · 2 comments · May be fixed by #182
Open

Comparing data between two fields rather than using hardcoded values #155

alirezanet opened this issue Feb 23, 2024 Discussed in #153 · 2 comments · May be fixed by #182
Labels
enhancement New feature or request

Comments

@alirezanet
Copy link
Owner

Discussed in #153

Originally posted by Robotxm February 21, 2024
Hello, I have following object definitions:

public record Item(string Name, List<TimeSchedule> Schedules);

public record TimeSchedule(int Start, int End);

Now I want to find all Items who has a schedule that its End time is before Start time.

With native LINQ I can do this:

List<Item> items =
[
    new Item("Item1", [new TimeSchedule(1, 2), new TimeSchedule(2, 3)]),
    new Item("Item2", [new TimeSchedule(1, 4), new TimeSchedule(4, 3)]),
    new Item("Item3", [new TimeSchedule(3, 2), new TimeSchedule(2, 3)]),
];

var results = items.Where(x => x.Schedules.Any(s => s.End < s.Start));

So how can I achieve this using Gridify?

@alirezanet alirezanet added the enhancement New feature or request label Jun 22, 2024
@alirezanet alirezanet changed the title Compare elements nested in a list of the root object Compare to two fields instead of hard an coded value Jun 22, 2024
@alirezanet alirezanet changed the title Compare to two fields instead of hard an coded value Compare two fields instead of hard an coded value Jun 22, 2024
@alirezanet alirezanet changed the title Compare two fields instead of hard an coded value Comparing data between two fields rather than using hardcoded values Jun 22, 2024
@alirezanet alirezanet self-assigned this Jun 22, 2024
@alirezanet alirezanet linked a pull request Jun 22, 2024 that will close this issue
7 tasks
@k94ll13nn3
Copy link

Hi, have you been able work on this or do you know if it is possible? This is something that I would also be interested in and I also tried to make it work with custom maps and operator but it does not seem possible at the moment.

@alirezanet
Copy link
Owner Author

Hi @k94ll13nn3,

Right now, it is not possible, but this is a feature I wanted to implement for v2.15. However, due to my busy schedule and other issues, it has been postponed. So far, we only have the test case :) but in the future, I'll definitely add support for this feature. Keep in mind that contributions are always welcome 😉

@alirezanet alirezanet removed their assignment Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants