History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2430
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Nick Sieger
Reporter: Leonardo Borges
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

XQueries fails (tested on DB2)

Created: 22/Apr/08 06:09 PM   Updated: 03/Jun/08 11:13 PM
Component/s: ActiveRecord-JDBC
Affects Version/s: JRuby 1.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Java Source File JdbcAdapterInternalService.java (44 kb)

Environment:
Ubuntu Linux 7.10
DB2 9.5

Patch Submitted: Yes


 Description  « Hide
The class JdbcAdapterInternalService has a bug(I think) in the method select_p that prevents a XQuery select statement
from being recognized as a select statement, falling always to the executeUpdate method, thus failing.

The query has the following format:

"xquery declare default element namespace "http://private";declare namespace
h="http://private/ns1";declare namespace hi="http://private/ns2"; <Private> { for $h
in db2-fn:sqlquery("SELECT xmldata FROM..."

Not sure if it's the best solution, but it's working so far on our project.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Nick Sieger - 03/Jun/08 11:13 PM
This seems a little too specific to put in the generic adapter code. Could we override the #select? method in the JdbcSpec::DB2 adapter to have this behavior?