-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multi-Notation support for SQL import (#59)
* multi-notation support - cardinalities * multi-notation support - UML * SQL export - add null constraint * SQL import - set optional type * SQL export - replace underscores in column type * multi-notation support - min max * multi-notation support - crow's foot * multi-notation support - chen * multi-notation support - bachman * SQL export - use constant * multi-notation support - unit tests * multi-notation support - unit test * multi-notation support - set notation option * multi-notation support - remove output files * multi-notation support - ignore output files * multi-notation support - initialize unit test * multi-notation support - read from classpath * multi-notation support - check directory * multi-notation support - add test annotations * Revert "multi-notation support - add test annotations" This reverts commit a8810da. * Revert "multi-notation support - initialize unit test" * Revert "Revert "multi-notation support - initialize unit test"" This reverts commit f529e87. * multi-notation support - check test input availability * Revert "Revert "Revert "multi-notation support - initialize unit test""" This reverts commit 01f1c22.
- Loading branch information
1 parent
c01451c
commit 0772570
Showing
80 changed files
with
7,284 additions
and
67 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
language-server/org.big.erd/src/main/java/org/big/erd/generator/sql/BachmanSqlImport.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.big.erd.generator.sql; | ||
|
||
public class BachmanSqlImport extends SqlImport { | ||
|
||
protected String getNotation() { | ||
return "bachman"; | ||
} | ||
|
||
protected String getCardinality(boolean isMandatory, boolean isSingle, int countMultiple) { | ||
return (isMandatory ? "1" : "0") + (isSingle ? "" : "+"); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
language-server/org.big.erd/src/main/java/org/big/erd/generator/sql/ChenSqlImport.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.big.erd.generator.sql; | ||
|
||
public class ChenSqlImport extends SqlImport { | ||
|
||
protected String getNotation() { | ||
return "chen"; | ||
} | ||
|
||
protected String getCardinality(boolean isMandatory, boolean isSingle, int countMultiple) { | ||
return isSingle ? "1" : ("" + (char)(Integer.max('A', 'N' - countMultiple))); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
language-server/org.big.erd/src/main/java/org/big/erd/generator/sql/CrowsFootSqlImport.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.big.erd.generator.sql; | ||
|
||
public class CrowsFootSqlImport extends SqlImport { | ||
|
||
protected String getNotation() { | ||
return "crowsfoot"; | ||
} | ||
|
||
protected String getCardinality(boolean isMandatory, boolean isSingle, int countMultiple) { | ||
if (!isMandatory) { | ||
if (isSingle) { | ||
return "?"; | ||
} else { | ||
return "0+"; | ||
} | ||
} else { | ||
if (isSingle) { | ||
return "1"; | ||
} else { | ||
return "1+"; | ||
} | ||
} | ||
} | ||
|
||
} |
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
13 changes: 13 additions & 0 deletions
13
language-server/org.big.erd/src/main/java/org/big/erd/generator/sql/MinMaxSqlImport.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.big.erd.generator.sql; | ||
|
||
public class MinMaxSqlImport extends SqlImport { | ||
|
||
protected String getNotation() { | ||
return "minmax"; | ||
} | ||
|
||
protected String getCardinality(boolean isMandatory, boolean isSingle, int countMultiple) { | ||
return (isMandatory ? "1" : "0") + "," + (isSingle ? "1" : "*"); | ||
} | ||
|
||
} |
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
Oops, something went wrong.