db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Riemer (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-216) Split SqlBuilder.copyData() to allow for copying specific columns
Date Thu, 17 Jul 2008 13:01:31 GMT
Split SqlBuilder.copyData() to allow for copying specific columns
-----------------------------------------------------------------

                 Key: DDLUTILS-216
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-216
             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: split_copy_data.patch

Currently the copyData() method on SqlBuilder is protected and only allows for copying data
between columns with the same name. In some cases (especially during upgrades) it may be useful
to copy the content of one column to another. 

As an example: during an upgrade a column may be moved out of a table to another table. To
implement this change it is required to create the new column in a table, copy the data from
the old column to the new column and optionally drop the old column.

This behavior can easily be achieved by splitting copyData() into a part that determines the
set of columns to copy and a part that actually copies the data between those columns. If
the last part if made into a public method, this also allows for users to implement their
custom table copy changes in combination with #DDLUTILS-215.

The attached patch implements this behavior. The patch does not break the existing API.

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


Mime
View raw message