cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (COCOON-1247) Multiple results not processed by SQLTransformer
Date Tue, 13 Jun 2006 12:25:31 GMT
     [ http://issues.apache.org/jira/browse/COCOON-1247?page=all ]
     
Vadim Gritsenko closed COCOON-1247:
-----------------------------------

    Fix Version: 2.2-dev (Current SVN)
                 2.1.10-dev (current SVN)
     Resolution: Fixed

added support for multiple results - please try it out

> Multiple results not processed by SQLTransformer
> ------------------------------------------------
>
>          Key: COCOON-1247
>          URL: http://issues.apache.org/jira/browse/COCOON-1247
>      Project: Cocoon
>         Type: Bug

>   Components: Blocks: Databases
>     Versions: 2.1.5
>  Environment: Operating System: All
> Platform: PC
>     Reporter: Andrew Stevens
>     Assignee: Cocoon Developers Team
>      Fix For: 2.2-dev (Current SVN), 2.1.10-dev (current SVN)

>
> I have a stored procedure which has four results; two update counts, a result
> set (which is what I'm wanting to use in my stylesheet), and another update
> count.  Asides from my problem in #30894, this wouldn't work anyway as the
> SQLTransformer only appears to handle the first result.  Query.execute() has
>                 boolean result = pst.execute();
>                 if ( result ) {
>                     rs = pst.getResultSet();
>                     md = rs.getMetaData();
>                 } else {
>                     rv = pst.getUpdateCount();
>                 }
> which sets the variables according to "the form of the *first* result" (to quote
> PreparedStatement's javadocs, my emphasis).  However, "Some prepared statements
> return multiple results" (again, from the javadocs) yet there's nothing in
> SQLTransformer to handle this; Query.next() finishes as soon as it finds an
> update count or the end of the current result set, and getMoreResults() never
> gets called.  Obviously, this means it would stop after my stored proc's first
> update count ("1 row inserted" into an audit table) and never get to the real
> data that I'm interested in.
> Even forgetting SPs, you can see the same effect with SQL queries by using two
> SELECTs in a single <query>.  If I run e.g.
> select distinct Permission_Code from USER_PERMISSIONS
> select distinct Sys_User_Code from USER_PERMISSIONS
> go
> in ISQL, I get two result sets returned in the output as expected.  If I use
> 			<query>
> select distinct Permission_Code from USER_PERMISSIONS
> select distinct Sys_User_Code from USER_PERMISSIONS
> 			</query>
> with the SQLTransformer, I only get the first set of values returned.  If all
> the results were processed for a query (e.g. a rowset for each result containing
> either the row data or a returncode as appropriate, maybe?) then I'd stand more
> chance of being able to get my SP working.

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


Mime
View raw message