db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: How to fetch the rows with Peer class
Date Tue, 05 Apr 2005 13:11:14 GMT
Kenji Ichikawa wrote:

> I would like to implement to fetch the rows with Peer class of Torque,
> becase the table row size is too large, so probably OutOfMemoryError
> will heppen if the following code is executed.
>
> Criteria criteria = new Criteria();
> List list = MyTablePeer.doSelect( criteria );
>
> I would like to know how to fetch the rows with Peer class,
> it's like the following code of JDBC implementation.
>
> Statement st = conn.createStatement();
> st.setFetchSize(50);
> ResultSet rs = st.executeQuery("SELECT * FROM my_table");
> while (rs.next()) {
>    System.out.print("a row was returned.");
> }
> rs.close();
> st.close();
>
> If you know how to do, Could you give me advice ?


What you really need is the LargeSelect class - look at the JavaDoc and 
test cases for usage.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message