Quantcast

access to ResultSet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

access to ResultSet

javaDeveloper
I want to know is there anyway to have a select statement return a
resultType of ResultSet? The reason I ask this is for processing large
sets of data, using a ResultHandler isn't tenable for me because my
calling code needs to maintain control of the processing loop
sequence, rather than a handleResult method in a separate Handler
class. If  the ResultSet can be returned by the query, the calling
code can maintain control, and at the same time use the ResultSet
batchSize limit for memory purposes.

Of course if there are any other suggestions that meet the criteria
above, I'm all ears.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: access to ResultSet

Poitras Christian
Hi,

I don't think it's possible since the idea of MyBatis is to hide most SQL specific classes.
When using a ResultHandler, you can control many things by using the ResultContext interface or select parameters like fetchSize and resultSetType.

Christian

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de javaDeveloper
Envoyé : April-17-12 3:51 PM
À : mybatis-user
Objet : access to ResultSet

I want to know is there anyway to have a select statement return a
resultType of ResultSet? The reason I ask this is for processing large
sets of data, using a ResultHandler isn't tenable for me because my
calling code needs to maintain control of the processing loop
sequence, rather than a handleResult method in a separate Handler
class. If  the ResultSet can be returned by the query, the calling
code can maintain control, and at the same time use the ResultSet
batchSize limit for memory purposes.

Of course if there are any other suggestions that meet the criteria
above, I'm all ears.
Loading...