cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Boksa <>
Subject Combining SQLTransformer and Paginator?
Date Thu, 08 Sep 2005 08:10:51 GMT

I am building a small pipeline to show the result of a database query.

It should display n rows at a time, even if the result of the query  
has more than n rows. As the result can be very large (100000 or more  
rows) it makes sense to use SQL's LIMIT m, n in my opinon. This  
always returns a result with n rows.

The problem is that this doesn't work with the paginator as far as I  
can see, as the paginator counts only the elements on the page, which  
is always n when using SQL's LIMIT.

The solution I am thinking about is to use a SQL query which counts  
the rows of the result (SELECT COUNT(id) FROM foo) and then generates  
some "dummy"-row elements using XSLT to match up the number of the  
total number elements and then use the paginator.

What Du you think about this approach? If there is a better way to do  
it, please let me know.

Thanks in advance,


View raw message