empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-238 additonal override when generating DDL script for database.
Date Tue, 16 Feb 2016 17:20:12 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 0fba96742 -> d1e69e281


EMPIREDB-238
additonal override when generating DDL script for database.


Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/d1e69e28
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/d1e69e28
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/d1e69e28

Branch: refs/heads/master
Commit: d1e69e2819a52c4180a3921af15c9e7024cbbac2
Parents: 0fba967
Author: Rainer Döbele <doebele@apache.org>
Authored: Tue Feb 16 18:20:05 2016 +0100
Committer: Rainer Döbele <doebele@apache.org>
Committed: Tue Feb 16 18:20:05 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/empire/db/DBDatabase.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/d1e69e28/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java b/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
index 056c9b6..bd4a754 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
@@ -300,12 +300,21 @@ public abstract class DBDatabase extends DBObject
             if (this.driver== null)
                 this.driver = driver;
             // Get DDL Command
-            driver.getDDLScript(DBCmdType.CREATE, this, script);
+            generateDDLScript(script);
             
         } finally {
             this.driver = prevDriver; 
         }
     }
+
+    /**
+     * Override this to change or add DDL commands
+     * @param script
+     */
+    protected void generateDDLScript(DBSQLScript script)
+    {
+        this.driver.getDDLScript(DBCmdType.CREATE, this, script); 
+    }
     
     /**
      * @see org.apache.empire.db.DBObject#getDatabase()


Mime
View raw message