JRuby

XQueries fails (tested on DB2)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Ubuntu Linux 7.10
    DB2 9.5
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

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.

Activity

Hide
Nick Sieger added a comment -

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?

Show
Nick Sieger added a comment - 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?

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: