Hi,
Village has functionality of this sort already build into it (and I think BasePeer
also supports stuff like this). It selects a certain number of rows from a
specific offset. Can't we just add this capability to Criteria like this
setOffset (int n)
setNumRows (int n)
Now we can just let it fall through and let Village handle the rest. I suspect
Village cycles through the resultset <NumRows> times. Because the actual data is
only transported once you ask for it this could give you the desired effect, it
think?
Might be a little slower that using a native LIMIT statement, but we can use it
over *any* database that is currently supported.
Any thoughts?
~ Leon
----- Original Message -----
From: John McNally <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Friday, August 04, 2000 2:13 AM
Subject: Re: PROPOSAL: Limiting resultsets with Criteria and BasePeer
>
> ----- Original Message -----
> From: Paul O'Leary <[EMAIL PROTECTED]>
> To: Turbine <[EMAIL PROTECTED]>
> Sent: Thursday, August 03, 2000 11:21 AM
> Subject: RE: PROPOSAL: Limiting resultsets with Criteria and BasePeer
>
>
> > nissim,
> >
> > java.sql.Statement.setMaxRows( int ) is supposed to already give you this
> > functionality, I believe.
> > http://java.sun.com/products//jdk/1.2/docs/api/java/sql/Statement.html
> >
> > *although* it's completely up to the implementor of the JDBC driver
> whether
> > and how it's supported.
> >
>
> And I have been told, though I didn't look myself, that some implementations
> retrieve the entire resultset and then throw away most of them. So it is
> not a safe way to limit memory consumption.
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]