Hi,

you can use the criteria.setLimit() and setOffset() methods to limit the
numbers of datasets to retrieve. Then you can iterate through the whole
table by increasing the offset in a loop, until you find no more datasets.

Hope that is what you were looking for.

     Thomas

Kenji Ichikawa <[EMAIL PROTECTED]> schrieb am 05.04.2005 04:00:30:

>
> Hello, I'm ichikawa.
>
> 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 ?
>
>
>
>
>
> ---------------------------
> Kenji Ichikawa
> mailto:[EMAIL PROTECTED]
> http://www.seta.co.jp/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to