-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Does Hibernate allow this: Sequential execution of SQL
PostPosted: Thu Feb 11, 2010 3:38 pm 
Beginner
Beginner

Joined: Thu May 28, 2009 10:25 am
Posts: 21
I have a requirement to achieve something like this (pseudocode follows)
Code:
Prepare Statement (select id from from tableX)
while hasResult
getNextResult(execute SQL statement to get next id)

Close statement


The Hibernate query iterator does something similar but gets all the ids initially . I'd like to have the underlying jdbc driver or the database know which id to fetch next.


Top
 Profile  
 
 Post subject: Re: Does Hibernate allow this: Sequential execution of SQL
PostPosted: Thu Feb 11, 2010 5:46 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Query.scroll()?

From the javadoc of the ScrollableResults class:

Quote:
The Query / ScrollableResults pattern is very similar to the JDBC PreparedStatement/ ResultSet pattern....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.