Just to clarify I didn't miss anything in the API doc:
If I want to provide a paging navigation with a "link per page" and/or a "go to 
last page" link, then I need to execute the overall query (in order to get the 
total amount of rows/pages (*)) and then re-execute the query for the current 
page.

(*) even worse:
as the RowIterator does not provide the number of rows (at least not for 
JCR-SQL2), I have to iterate over all rows just to get the total number of 
rows. Yes, SQL has COUNT but xpath doesn't 
(https://issues.apache.org/jira/browse/JCR-260), so there is no generic count 
for the various query languages...

> -----Original Message-----
> From: Clemens Wyss - MySign AG [mailto:[email protected]]
> Sent: Wednesday, August 18, 2010 4:05 PM
> To: '[email protected]'
> Subject: RE: JCR-SQL2 : paging
>
>
> >Or is there a "JCR pattern" for paging?
> Query.setLimit and Query.setOffset seem to provide the
> generic (search language independent) approach for paging.
>
> Sorry for the noise...
> Clemens
>
> > -----Original Message-----
> > From: Clemens Wyss - MySign AG
> > Sent: Wednesday, August 18, 2010 3:54 PM
> > To: '[email protected]'
> > Subject: JCR-SQL2 : paging
> >
> >
> > how would you implement paging with JCR-SQL2? Im looking for
> > MySQL's LIMIT equivalent. Or is there a "JCR pattern" for paging?
> >
> > Thx in advance
> >
>

Reply via email to