Hi Scott, Scott W. Hill wrote: > I'm using OJB with Postgresql, and want to use something like the LIMIT > restriction (to limit the number of returned results and therefore the > overhead for my app). What's the best approach to do this under OJB? >
You cannot use LIMIT directly as it's a propietary feature. But the OJB Queries have a method setEndAtIndex(int) to tell the underlying resultset iterator when to stop materializing objects. There is also a setStartAtIndex(int) to set an offset. With these to methods you can build nice paging tools to display only certain amounts of data from a resultset at a time. cheers Thomas > --Scott > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
