-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First attempt at an implementation that detects Ruby on Rails naming …
…conventions in references to PKs.
- Loading branch information
johncurrier
committed
Sep 25, 2008
1 parent
39a9cd3
commit 5a81a4f
Showing
5 changed files
with
114 additions
and
1 deletion.
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
30 changes: 30 additions & 0 deletions
30
src/net/sourceforge/schemaspy/model/RailsForeignKeyConstraint.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,30 @@ | ||
package net.sourceforge.schemaspy.model; | ||
|
||
import net.sourceforge.schemaspy.DbAnalyzer; | ||
|
||
/** | ||
* See {@link DbAnalyzer#getRailsConstraints(java.util.Map)} for | ||
* details on Rails naming conventions. | ||
* | ||
* @author John Currier | ||
*/ | ||
public class RailsForeignKeyConstraint extends ForeignKeyConstraint { | ||
/** | ||
* @param parentColumn | ||
* @param childColumn | ||
*/ | ||
public RailsForeignKeyConstraint(TableColumn parentColumn, TableColumn childColumn) { | ||
super(parentColumn, childColumn); | ||
} | ||
|
||
/** | ||
* Normally the name of the constraint, but this one is implied by | ||
* Rails naming conventions. | ||
* | ||
* @return | ||
*/ | ||
@Override | ||
public String getName() { | ||
return "ByRailsConventionConstraint"; | ||
} | ||
} |