ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Rouillier <guyr-...@burntmail.com>
Subject Re: DRY for <where> clauses?
Date Tue, 24 Nov 2009 19:48:23 GMT
> On Mon, Nov 23, 2009 at 9:11 AM, Stephen Friedrich 
> <stephen.friedrich@fortis-it.eu> wrote:
> My application uses a lot of "manual" paging (using ROWNUM and
> nested selects in Oracle PL/SQL). For each of these queries there
> is a second query that returns the total number of results with
> _identical with-clause_ (sometimes quite complex). Does iBatis
> offer any help in avoiding these code duplicates?
> (Or does anybody know a better way, for example a way to retrieve
> both the total count and a specific "page" in a single statement?)

Depending on your result set size, you may want to consider a pager 
external to the DB.  We are developing a JSF application and use the 
Tomahawk pager for this purpose.  Won't work if your result set is 1 
million rows, but if it is more like 500-1000 rows then it works fine.

Guy Rouillier

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message