gert-wijns / TypeSafeQueryBuilder

Compile time assistence while creating queries, making them more type safe and easier to refactor
6 stars 8 forks source link

Add doMapByQuery/doGroupByQuery using a key for easier selection #97

Closed gert-wijns closed 5 years ago

gert-wijns commented 5 years ago

Allow easier group by without being forced to add the field in the select dto

dao.doMapByQuery(query, obj.getName()) Result: Map<String, Dto>

dao.doGroupByQuery(query, obj.getName()) Result: Map<String, List>

Pair<String, String> mapKey = query.selectMapKey(Pair.class); dao.doMapByQuery(query, mapKey) Map<Pair<String, String>, Dto>