You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Thorbjørn Ravn Andersen (JIRA)" <ji...@apache.org> on 2005/11/08 16:36:19 UTC

[jira] Created: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

createDatabase and alterDatabase should give access to the generated SQL.
-------------------------------------------------------------------------

         Key: DDLUTILS-45
         URL: http://issues.apache.org/jira/browse/DDLUTILS-45
     Project: DdlUtils
        Type: Improvement
    Reporter: Thorbjørn Ravn Andersen
 Assigned to: Thomas Dudziak 
    Priority: Minor
 Attachments: sql-access.txt

In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.

It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.

This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

Posted by "Thorbjørn Ravn Andersen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-45?page=comments#action_12357103 ] 

Thorbjørn Ravn Andersen commented on DDLUTILS-45:
-------------------------------------------------

This functionality is what I extracted as methods from createDatabase and alterDatabase, so it basically exposes the underlying implementation.  If this would be an officially supported functionality instead of just being possible, it would be nice to have public methods for doing this.

> createDatabase and alterDatabase should give access to the generated SQL.
> -------------------------------------------------------------------------
>
>          Key: DDLUTILS-45
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-45
>      Project: DdlUtils
>         Type: Improvement
>     Reporter: Thorbjørn Ravn Andersen
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: sql-access.txt
>
> In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.
> It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.
> This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-45?page=all ]

Thomas Dudziak updated DDLUTILS-45:
-----------------------------------

    Component: Core (No specific database)

> createDatabase and alterDatabase should give access to the generated SQL.
> -------------------------------------------------------------------------
>
>          Key: DDLUTILS-45
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-45
>      Project: DdlUtils
>         Type: Improvement

>   Components: Core (No specific database)
>     Reporter: Thorbjørn Ravn Andersen
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: sql-access.txt
>
> In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.
> It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.
> This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-45?page=all ]
     
Thomas Dudziak resolved DDLUTILS-45:
------------------------------------

    Resolution: Fixed

> createDatabase and alterDatabase should give access to the generated SQL.
> -------------------------------------------------------------------------
>
>          Key: DDLUTILS-45
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-45
>      Project: DdlUtils
>         Type: Improvement
>     Reporter: Thorbjørn Ravn Andersen
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: sql-access.txt
>
> In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.
> It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.
> This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

Posted by "Martin van den Bemt (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-45?page=comments#action_12357072 ] 

Martin van den Bemt commented on DDLUTILS-45:
---------------------------------------------

This is already possible :

        Platform platform = PlatformFactory.createNewPlatformInstance(databaseType);
        StringWriter writer = new StringWriter();
        platform.getSqlBuilder().setWriter(writer);
        Database source = null;
        try {
            source = platform.getModelReader().getDatabase(getConnection());
        } catch (SQLException e1) {
            e1.printStackTrace();
        }
        try {
            platform.getSqlBuilder().alterDatabase(source, database, false, true);
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("sql : \n"+writer.getBuffer());



> createDatabase and alterDatabase should give access to the generated SQL.
> -------------------------------------------------------------------------
>
>          Key: DDLUTILS-45
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-45
>      Project: DdlUtils
>         Type: Improvement
>     Reporter: Thorbjørn Ravn Andersen
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: sql-access.txt
>
> In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.
> It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.
> This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DDLUTILS-45) createDatabase and alterDatabase should give access to the generated SQL.

Posted by "Thorbjørn Ravn Andersen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-45?page=all ]

Thorbjørn Ravn Andersen updated DDLUTILS-45:
--------------------------------------------

    Attachment: sql-access.txt

Patch providing alterTablesSQL and createTablesSQL

> createDatabase and alterDatabase should give access to the generated SQL.
> -------------------------------------------------------------------------
>
>          Key: DDLUTILS-45
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-45
>      Project: DdlUtils
>         Type: Improvement
>     Reporter: Thorbjørn Ravn Andersen
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: sql-access.txt
>
> In a scenario where you work with XML-representations of databases, you do not necessarily want to first create the first schema in a database, and then alter to the second to see how it works.
> It would be quite suitable just to work on the models loaded from XML and then just generate the corresponding SQL without executing it.
> This would provide for debugging and documentation purposes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira