I'm trying to build a Querydsl expression in Java. I'm trying to get to:
where (last_name, first_name, actor_id) < ('Allen', 'Meryl', 194)
Where we're doing the tuple comparison. This is supported by mysql and postgres.
I've got all my ComparablePaths in:
List<ComparablePath> paths = new ArrayList<>();
You can assume this list is correctly populated (it is). So, I'm trying to do:
BooleanBuilder pred = new BooleanBuilder(Expressions.list(paths.toArray(new ComparablePath[0])).???);
But ??? does not have the lt operator. Just eq, ne, in, not in, etc. None of the comparison ones.
How can we generate the tuple comparison in querydsl?
If we assume that the paths list is ordered the same way as the fields in the tuple we can do :