Nageswara Rao
Nageswara Rao

Reputation: 964

Mapping Aggregated Results in JDBi

Aggregation query is select min(sal) as minSal, max(sal) maxSal from Emp.

I think it is redundant to create a Mapper and VO only for this use-case.

Is there a predefined mapper where I can post result into a map for example exists in JDBi?

Upvotes: 2

Views: 339

Answers (1)

ahus1
ahus1

Reputation: 5950

There is the class DefaultMapper available to do this.

package org.skife.jdbi.v2;

public class DefaultMapper implements ResultSetMapper<Map<String, Object>> {
  /* .... */
}

Upvotes: 1

Related Questions