You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Peter Köhler (JIRA)" <ib...@incubator.apache.org> on 2006/04/28 15:11:37 UTC

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

implement resultset methods in com.ibatis.sqlmap.client.SqlMapClient:
---------------------------------------------------------------------

         Key: IBATIS-290
         URL: http://issues.apache.org/jira/browse/IBATIS-290
     Project: iBatis for Java
        Type: New Feature

  Components: SQL Maps  
    Versions: 2.2.5, 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.
-
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


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

Posted by "David Smiley (JIRA)" <ib...@incubator.apache.org>.
    [ 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.


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

Posted by "Davide Rogora (JIRA)" <ib...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/IBATIS-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545765 ] 

Davide Rogora commented on IBATIS-290:
--------------------------------------

The queryForResultSet method would be a nice feature also for us!

We are using JasperReports as reporting tool and we need to pass a java.sql.resultset to JasperReports (I've tried to pass a list of beans to JasperReports but, for a lot of reports, it generates performance problems or OutOfMemory exceptions).

Thanks,
Davide.

> 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.