Hey I have a query like this:
Map<List<?>, Boolean> dateRangeExistsMap = context
.select(BLOCK_ASSIGNMENT.START_DATE, BLOCK_ASSIGNMENT.END_DATE,
DSL.field(DSL.count().ge(1)))
.from(BLOCK_ASSIGNMENT)
.groupBy(new Field<?>[]{BLOCK_ASSIGNMENT.START_DATE,
BLOCK_ASSIGNMENT.END_DATE})
.fetchMap(new Field<?>[]{BLOCK_ASSIGNMENT.START_DATE,
BLOCK_ASSIGNMENT.END_DATE},
new RecordMapper<Record3<LocalDate, LocalDate, Boolean>, Boolean>()
{
@Override
public Boolean map(Record3<LocalDate, LocalDate, Boolean>
record) {
return record.value3();
}
});
I was wondering if there was a better way to create the map so doing a lookup
wouldn't require the creation of a list? The only issue I have with this
approach now is that the order the elements are inserted must match the order
of fields in the fetchMap.
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.