ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts" <Daniel.Pi...@cnet.com>
Subject RE: Getting straight at the ResultSet
Date Thu, 04 Jan 2007 20:10:52 GMT
iBATIS is used to wrap JDBC, so that you don't have to deal with the low
level details.
If you want to deal with the low level details, simply don't use iBATIS.
You are going to have an overhead if you use wrapper, but the overhead
is probably minimal.  
 
Do things the normal iBATIS way, and if you find out it is too slow, do
some profiling, don't just assume its because of a particular wrappers
overhead. You'll be disappointed very often if you assume too much..
 
 

________________________________

From: Tegan Clark [mailto:tegan.clark@yahoo.com] 
Sent: Thursday, January 04, 2007 12:02 PM
To: user-java@ibatis.apache.org
Subject: RE: Getting straight at the ResultSet


Damien/Larry,
 
Thanks for the reply.  I've looked at RowHandler, and unless I'm missing
something iBATIS is still controlling the iteration and passing me a Map
of the underlying data, i.e. iBATIS first incures the overhead of
adapting the ResultSet to the Map, and then I must implement some sought
of buffer to hold the returned results (unless I implement some sought
of callback out of my DAL).
 
Do my assumptions above sound correct?
 
There's no way to map the ResultSet straight back? i.e:
 
   ResultSet res = (ResultSet ) sqlClient.queryForObject();
 
Thanks again.
 
Tegan
 

Damien McCarthy <damien.mccarthy@propylon.com> wrote:

	Hi Tegan,
	 
	I think the RowHandler interface will provide the functionality
you need, this will allow you to iterate the objects. 
	 
	Take a look in p61 of the developer handbook for a nice example 
	 
	Damien.
	 
	Ps. The Handbook is at :
http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf
	 
	 
	From: Tegan Clark [mailto:tegan.clark@yahoo.com] 
	Sent: 04 January 2007 16:21
	To: user-java@ibatis.apache.org
	Subject: Getting straight at the ResultSet
	 
	Hi group;
	 
	I was wondering if there is any way to receive the ResultSet
back straight from iBATIS, i.e. allow iBATIS to do the mapping on the
way in, but let me manipulate the ResultSet directly on the way out.
	 
	I have a framework that uses iBATIS to product "no-code" reports
(just the xml).  Some of those reports can stretch to 100,000's or
records though so are better suited to an iterator approach and
non-reflective mapping.
	 
	If it can't be done, is this something iBATIS would be
interested in having contributed?
	 
	All help greatly appreciated.  Thanks.
	 
	Tegan
	 __________________________________________________
	Do You Yahoo!?
	Tired of spam? Yahoo! Mail has the best spam protection around 
	http://mail.yahoo.com 


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Mime
View raw message