Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2856

groovy.sql.DataSet should alias table name in SQL to accomodate http://download.oracle.com/docs/cd/B14117_01/java.101/b10979/resltset.htm#sthref1543 17.2.2.1.1 Workaround

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • SQL processing
    • None
    • any Oracle environment

    Description

      The example at http://groovy.codehaus.org/Database+features ...

      // allow resultSets to be able to be changed
      sql.resultSetConcurrency = java.sql.ResultSet.CONCUR_UPDATABLE

      // change the data
      sql.eachRow("select * from PERSON") {
      it.firstname = it.firstname * 2
      }

      will not work with Oracle because Oracle disallows ResultSet CONCUR_UPDATABLE on "select * from t". However, Oracle allows it for "select t1.* from t t1" per the link in this ticket's summary. Looked to me like groovy.sql.DataSet.java would do this with a little tweaking, and should be harmless to other database environments.

      Attachments

        Activity

          People

            paulk Paul King
            mosborn Matthew Osborn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: