db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From graf...@comcast.net
Subject Re: row limits in derby?
Date Fri, 06 May 2005 18:43:47 GMT
thanks, but that's only half of it. need to also be able to start in the middle (i.e. we're
paginating results). i was surprised that derby didn't have this, as it's been a while since
i've seen a db that didn't...

i am using hibernate and wnated to try derby on the backend, but need this functionality.
i don't mind extending hibernate's DerbyDialect, just don't know if it can be done or how.



> >>>>>>>>>>>> grafpoo@comcast.net wrote (2005-05-06
18:24:11): from
> >what i can tell, and from looking at the hibernate DerbyDialect,
> >derby does not support "row limit" queries, i.e. queries where i
> >restrict the returned rows to some chunk (e.g. "first 20 rows" or
> >"rows 51-100").
> > 
> > true?
> > 
> > sidenote: row limits - is that what they are called? if not, that
> > could explain why i can't find any reference to them in the docs
> > 
> > thnaks
> 
> Maybe not exactly what you're askin for, but JDBC Statement has two
> methods for limiting the number of rows fetched, depending on what you
> actually want:
> 
> 	void setMaxRows(int max)
>           Sets the limit for the maximum number of rows that any
>           ResultSet object can contain to the given number.
> 
> 	void setFetchSize(int rows)
>           Gives the JDBC driver a hint as to the number of rows that
>           should be fetched from the database when more rows are
>           needed.
> 
> 
> 
> -- 
> Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Norway

Mime
View raw message