From b18db6b9953ab860e0a7fe0d3a400f3330af8e8a Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 4 Feb 2008 15:53:00 +0000 Subject: [PATCH] Now correctly ouputs composite primary keys, among other things. However, not currently getting all constraints right and also the 'myresponsibility' mechanism for when to output link tables is not working entirely correctly. --- transforms01/adl2mssql.xslt | 160 ++++++++++++++---------------------- 1 file changed, 63 insertions(+), 97 deletions(-) diff --git a/transforms01/adl2mssql.xslt b/transforms01/adl2mssql.xslt index 85949dd..b8192c6 100755 --- a/transforms01/adl2mssql.xslt +++ b/transforms01/adl2mssql.xslt @@ -12,7 +12,7 @@ Convert ADL to MS-SQL $Author: sb $ - $Revision: 1.2 $ + $Revision: 1.3 $ --> @@ -22,7 +22,7 @@ ------------------------------------------------------------------------------------------------- -- -- Database for application version - -- Generated for MS-SQL 2000+ using adl2mssql.xsl $Revision: 1.2 $ + -- Generated for MS-SQL 2000+ using adl2mssql.xsl $Revision: 1.3 $ -- -- Code generator (c) 2007 Cygnet Solutions Ltd -- @@ -34,12 +34,17 @@ ------------------------------------------------------------------------------------------------- - -- tables, views and permissions + -- primary tables, views and permissions ------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------- - -- referential integrity constraints + -- link tables + ------------------------------------------------------------------------------------------------- + + + ------------------------------------------------------------------------------------------------- + -- primary referential integrity constraints ------------------------------------------------------------------------------------------------- @@ -129,12 +134,10 @@ ------------------------------------------------------------------------------------------------- CREATE TABLE "" ( - - PRIMARY KEY, - - + , + ) GO @@ -145,43 +148,52 @@ + + - - ---- link tables ------------------------------------------------------------------------------ - - - - - - + + + , + PRIMARY KEY( "", ) + + - - - - - - - - - - - - - - - - - ""." + + + + + + + + + + ""."" + ' ' + - - - - - - + + + + + + + + + + + + + + + + @@ -292,7 +304,6 @@ - -- Responsibility = '' @@ -368,6 +379,11 @@ INT IDENTITY( 1, 1) + + IDENTITY( 1, 1) + + + @@ -381,15 +397,19 @@ - "" + + + "" NOT NULL DEFAULT '' - NOT NULL + @@ -408,60 +428,6 @@ test="@required='true'"> NOT NULL -