Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java3
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java12
2 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
index 5d52c6c863..9245a08350 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.db;
import org.eclipse.net4j.db.ddl.IDBSchema;
+import org.eclipse.net4j.db.ddl.delta.IDBSchemaDelta;
import org.eclipse.net4j.util.collection.Closeable;
/**
@@ -25,5 +26,7 @@ public interface IDBSchemaTransaction extends IDBElement, Closeable
public IDBSchema getDBSchema();
+ public IDBSchemaDelta getDBSchemaDelta();
+
public void commit();
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
index a7811627e5..8ce4d64b11 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
@@ -46,16 +46,22 @@ public final class DBSchemaTransaction extends DBElement implements IDBSchemaTra
return dbSchema;
}
+ public IDBSchemaDelta getDBSchemaDelta()
+ {
+ DBInstance dbInstance = dbConnection.getDBInstance();
+ DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
+ return dbSchema.compare(oldSchema);
+ }
+
public void commit()
{
DBInstance dbInstance = dbConnection.getDBInstance();
+ DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
+ IDBSchemaDelta delta = dbSchema.compare(oldSchema);
IDBAdapter dbAdapter = dbInstance.getDBAdapter();
Connection connection = dbConnection.getSQLConnection();
- DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
- IDBSchemaDelta delta = dbSchema.compare(oldSchema);
-
try
{
oldSchema.unlock();

Back to the top