MyBatis with resultType "ResultSet" or alternative result.
I have used MyBatis in one project with luck. What I like about it the most is the XML mapper files which allow me to build very large dynamic queries from chunks of sql code.
This is, there are times i would like only to use the sql statement preparation code of MyBatis and not actual mapping. For the performance reasons I would be perfectly happy if MyBatis handed me a ready to iterate ResultSet.
- sometimes the ResultSet is way too big for putting results into list
- sometimes mapping data to maps or pojos is simply a waste of memory and processing power.
Would that be possible? I tried digging into the source and failed. I wasn't able to isolate the classes that build and prepare the query from the logic that actually processes the results.
Re: MyBatis with resultType "ResultSet" or alternative result.
On 3/22/2013 6:42 PM, Leszek Gawron wrote:
> The ResultHandler already performs the mapping. I would like to avoid that.
Which is why you were suggested to write your *own* ResultSetHandler.
You would replace the automatic mapping done by the default one.