[jira] Created: (DDLUTILS-217) Retrieve columns by name iso index

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (DDLUTILS-217) Retrieve columns by name iso index

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Retrieve columns by name iso index
----------------------------------

                 Key: DDLUTILS-217
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-217
             Project: DdlUtils
          Issue Type: Improvement
          Components: Core (No specific database)
    Affects Versions: 1.0
            Reporter: Rick Riemer
            Assignee: Thomas Dudziak
             Fix For: 1.1


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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DDLUTILS-217) Retrieve columns by name iso index

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/DDLUTILS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Riemer updated DDLUTILS-217:
---------------------------------

    Attachment: retrieve_column_by_name.patch

> Retrieve columns by name iso index
> ----------------------------------
>
>                 Key: DDLUTILS-217
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-217
>             Project: DdlUtils
>          Issue Type: Improvement
>          Components: Core (No specific database)
>    Affects Versions: 1.0
>            Reporter: Rick Riemer
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: retrieve_column_by_name.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DDLUTILS-217) Retrieve columns by name iso index

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/DDLUTILS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614346#action_12614346 ]

Rick Riemer commented on DDLUTILS-217:
--------------------------------------

This patch was tested to work on SQL Server 2005, IBM DB2 v9.5 Express-C, PostgreSQL 8.2 and HSQLDB 1.8.0.

> Retrieve columns by name iso index
> ----------------------------------
>
>                 Key: DDLUTILS-217
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-217
>             Project: DdlUtils
>          Issue Type: Improvement
>          Components: Core (No specific database)
>    Affects Versions: 1.0
>            Reporter: Rick Riemer
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: retrieve_column_by_name.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


DDLUtils JDBC and Java version support

by Rick Riemer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've recently submitted a few patches for the DdlUtils project through JIRA. While creating those patches I wondered what levels of Java and JDBC DdlUtils supports. I wanted to use some Java 5 features, but I was not sure if I could.

Is this information available somewhere? If not, it would be useful to add it on the site somewhere.

Regards,

Rick Riemer

Re: DDLUtils JDBC and Java version support

by Thomas Dudziak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 17, 2008 at 7:19 AM, Rick Riemer <rick.riemer@...> wrote:

> I've recently submitted a few patches for the DdlUtils project through JIRA. While creating those patches I wondered what levels of Java and JDBC DdlUtils supports. I wanted to use some Java 5 features, but I was not sure if I could.
>
> Is this information available somewhere? If not, it would be useful to add it on the site somewhere.

DdlUtils is not Java 5 and will not be in the 1.x line (that might
change in 2.x); starting with version 1.1 it is Java 1.4 / JDBC 3.

Tom

[jira] Resolved: (DDLUTILS-217) Retrieve columns by name iso index

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/DDLUTILS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Dudziak resolved DDLUTILS-217.
-------------------------------------

    Resolution: Fixed

> Retrieve columns by name iso index
> ----------------------------------
>
>                 Key: DDLUTILS-217
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-217
>             Project: DdlUtils
>          Issue Type: Improvement
>          Components: Core (No specific database)
>    Affects Versions: 1.0
>            Reporter: Rick Riemer
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: retrieve_column_by_name.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

LightInTheBox - Buy quality products at wholesale price!