-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from AdaptiveScale/release-2.2.2
Release 2.2.2
- Loading branch information
Showing
13 changed files
with
482 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ public enum RosettaModuleTypes { | |
COLUMN_EXTRACTOR, | ||
TABLE_EXTRACTOR, | ||
VIEW_EXTRACTOR, | ||
DIFF_TESTER, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
ddl/src/main/resources/templates/kinetica/foreignkey/create.sqlt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
ALTER TABLE "[(${schemaName})]"."[(${tableName})]" ADD FOREIGN KEY ("[(${foreignkeyColumn})]") REFERENCES "[(${primaryTableSchema})]"."[(${primaryTableName})]"("[(${foreignKeyPrimaryColumnName})]") AS [(${foreignkeyName})]; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
ALTER TABLE "[(${schemaName})]"."[(${tableName})]" DROP FOREIGN KEY "[(${foreignkeyName})]"; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
diff/src/main/java/com/adaptivescale/rosetta/diff/DiffFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
package com.adaptivescale.rosetta.diff; | ||
|
||
import com.adaptivescale.rosetta.common.helpers.ModuleLoader; | ||
import com.adaptivescale.rosetta.common.models.Database; | ||
import com.adaptivescale.rosetta.common.types.RosettaModuleTypes; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public class DiffFactory { | ||
|
||
public static Diff<List<String>,Database, Database> diff(){ | ||
return new DefaultTester(); | ||
public static Diff<List<String>,Database, Database> diff(String databaseType) { | ||
|
||
Optional<Class<?>> diffTester = ModuleLoader.loadModuleByAnnotationClassValues( | ||
DiffFactory.class.getPackageName(), RosettaModuleTypes.DIFF_TESTER, databaseType); | ||
|
||
if (diffTester.isEmpty()) { | ||
return new DefaultTester(); | ||
} | ||
|
||
try { | ||
return (Diff<List<String>, Database, Database>) diffTester.get().getDeclaredConstructor().newInstance(); | ||
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
Oops, something went wrong.