Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-217

Retrieve columns by name iso index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • None

    Description

      MetaDataColumnDescriptor.readColumn() currently attempts to find the column index of a column before retrieving it from the ResultSet in order for it to return the default value if the column does not exist. Some JDBC implementations (e.g. IBM's DB2 JCC4 driver) have broken ResultSetMetaData implementations however, which do not return the correct columns names.

      By attempting to retrieve the columns by name iso index before retrieving the ResultSetMetaData we avoid hitting these broken paths in the general case. It has the added benefit of not having to retrieve the result set meta data for each column read, which may be potentially harmful to the performance.

      I'm attaching a patch which implements this behavior.

      Attachments

        1. retrieve_column_by_name.patch
          3 kB
          Rick Riemer

        Activity

          People

            tomdz Thomas Dudziak
            ricqr Rick Riemer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: