ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-368) RowHandler implementation needs to be able to end current resultSet processing
Date Fri, 17 Nov 2006 13:23:42 GMT
    [ http://issues.apache.org/jira/browse/IBATIS-368?page=comments#action_12450735 ] 
Larry Meadors commented on IBATIS-368:

Changing this signature would break every existing rowhandler written, so that won't do. :-)

If you add a method to the interface, that will do the same thing.

You could create an AbortableRowHandler interface that extends the existing interface, and
add a 'boolean stopProcessing()' method to it.

It would take some tinkering with the internals, but I think it would work.

> RowHandler implementation needs to be able to end current resultSet  processing
> -------------------------------------------------------------------------------
>                 Key: IBATIS-368
>                 URL: http://issues.apache.org/jira/browse/IBATIS-368
>             Project: iBatis for Java
>          Issue Type: Improvement
>    Affects Versions: 2.1.7
>            Reporter: Kai Grabfelder
> The current RowHandler interface lacks the possibility to end current resultSet processing.
> If a join query which joins categories and products Per category multiple products are
allowed. The query is sorted by category ID. The query returns 100 000 rows but I only want
to return the first 100 categories. I can not use the current limit functionalities of ibatis
as I don't know how many products are present per category. So the number of rows to get the
first 200 categories could be anything between 200 and infinity.
> I've written my own RowHandler implementation that throws and exception after the first
200 categoires - but that is not very nice. So why not change the interface of RowHandler#handleRow()
 to return boolean instead of void  - this way the result set processing could be interupted
if desired.
> cheers
> Kai

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message