You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "David Smiley (JIRA)" <ib...@incubator.apache.org> on 2008/07/15 22:47:31 UTC

[jira] Commented: (IBATIS-290) implement resultset methods in com.ibatis.sqlmap.client.SqlMapClient:

    [ https://issues.apache.org/jira/browse/IBATIS-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613726#action_12613726 ] 

David Smiley commented on IBATIS-290:
-------------------------------------

Yes, definitely.  I have code that operates on a ResultSet that I am not in a position to change, and I'd like iBatis to perform the query but not do anything with the resultset.  I was thinking, one way to do this with iBatiis might be to specify that the resultClass of a query is java.lang.ResultSet.  When this occurs, iBatis could know to directly return it when calling one of its existing methods.  And if a queryWithRowHandler is invoked, the ResultSet could be the object passed to handleRow().

> implement resultset methods in com.ibatis.sqlmap.client.SqlMapClient:
> ---------------------------------------------------------------------
>
>                 Key: IBATIS-290
>                 URL: https://issues.apache.org/jira/browse/IBATIS-290
>             Project: iBatis for Java
>          Issue Type: New Feature
>          Components: SQL Maps
>    Affects Versions: 2.2.0
>            Reporter: Peter Köhler
>
> Hello to the ibatis community,
> her is my wish list for a new release:
> Implement new methods in com.ibatis.sqlmap.client.SqlMapClient:
>   public java.sql.ResultSet queryForResultSet(String mappedStatement, Object parameter);
>   public java.util.List getListForResultSet(String resultMap, java.sql.ResultSet resultSet);
>   public java.util.List getListForResultSet(String resultMap, java.sql.ResultSet resultSet, int maxRows);
>   public java.util.List getListForResultSet(java.lang.Class, java.sql.ResultSet resultSet);
>   public java.util.List getListForResultSet(java.lang.Class, java.sql.ResultSet resultSet, int maxRows);
> So that one could retrieve a ResultSet (first method) and then map it to Objects in a List via
> ResultMaps or via automapping.
> My motivation behind this is that developers sometimes have to deal with resultsets which are 
> required by other API´s.
> It would be great to leverage Ibatis even in this low level environment.
> Another use case is to avoid OutOfMemoryErrors in huge and expensive resultsets by stepping through one resultset, 
> instead of repeating the query multiple times with different step sizes.
> Thanks in advance and happy discussing ;)
> Greetings from Frankfurt, Germany
> Peter Köhler

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.