empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1442118 - in /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db: DBDDLGenerator.java hsql/HSqlDDLGenerator.java oracle/OracleDDLGenerator.java
Date Mon, 04 Feb 2013 13:48:06 GMT
Author: doebele
Date: Mon Feb  4 13:48:06 2013
New Revision: 1442118

URL: http://svn.apache.org/viewvc?rev=1442118&view=rev
Log:
EMPIREDB-155
new property 'databaseObjectName' in DBDDLGenerator.java to fix problem with DROP database
in HSQL reported by Eike Kettner.

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/HSqlDDLGenerator.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java?rev=1442118&r1=1442117&r2=1442118&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java Mon Feb
 4 13:48:06 2013
@@ -52,6 +52,7 @@ public abstract class DBDDLGenerator<T e
     // Options
     protected boolean namePrimaryKeyConstraint = false; // Add name for primary key constraint
     protected String  alterColumnPhrase  = " ALTER ";   // Phrase for altering a column
+    protected String  databaseObjectName = "DATABASE";  // Database object name for DROP
database
     
     protected DBDDLGenerator(T driver)
     {
@@ -216,7 +217,7 @@ public abstract class DBDDLGenerator<T e
                     createDatabase((DBDatabase) dbo, script);
                     return;
                 case DROP:
-                    dropObject(((DBDatabase) dbo).getSchema(), "USER", script);
+                    dropObject(((DBDatabase) dbo).getSchema(), databaseObjectName, script);
                     return;
                 default:
                     throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName()
+ "." + type);

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/HSqlDDLGenerator.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/HSqlDDLGenerator.java?rev=1442118&r1=1442117&r2=1442118&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/HSqlDDLGenerator.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/HSqlDDLGenerator.java
Mon Feb  4 13:48:06 2013
@@ -33,6 +33,8 @@ public class HSqlDDLGenerator extends DB
     public HSqlDDLGenerator(DBDatabaseDriverHSql driver)
     {
         super(driver);
+        // Database object name for DROP database
+        databaseObjectName = "SCHEMA";
         // set Oracle specific data types
         initDataTypes();
     }

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java?rev=1442118&r1=1442117&r2=1442118&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java
Mon Feb  4 13:48:06 2013
@@ -35,6 +35,8 @@ public class OracleDDLGenerator extends 
     public OracleDDLGenerator(DBDatabaseDriverOracle driver)
     {
         super(driver);
+        // Database object name for DROP database
+        databaseObjectName = "USER";
         // Alter Column Phrase
         alterColumnPhrase  = " MODIFY ";
         // Name Primary Keys



Mime
View raw message