diff --git a/TestApp/Auto/1 b/TestApp/Auto/1 new file mode 100755 index 0000000..139597f --- /dev/null +++ b/TestApp/Auto/1 @@ -0,0 +1,2 @@ + + diff --git a/TestApp/Web/Controllers/Auto/1 b/TestApp/Web/Controllers/Auto/1 new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/TestApp/Web/Controllers/Auto/1 @@ -0,0 +1 @@ + diff --git a/TestApp/Web/Views/Auto/test/1 b/TestApp/Web/Views/Auto/test/1 new file mode 100755 index 0000000..b8a19f2 --- /dev/null +++ b/TestApp/Web/Views/Auto/test/1 @@ -0,0 +1,17 @@ + + + + + diff --git a/TestApp/testapp.adl.xml b/TestApp/testapp.adl.xml new file mode 100755 index 0000000..6d864df --- /dev/null +++ b/TestApp/testapp.adl.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + a postcode follows arcane rules; this specification from + http://regexlib.com/REDetails.aspx?regexp_id=260. + + + + + We don't believe people who claim to be over 120. + + + + + + + + + + + + + + + + + + + +
+ + + Basic data about the person + + + + + + + + Family name of this person, conventionally their last name + + + + + + + + + +
+
+ + + + + + House or building number + + + + + + + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/TestApp/testapp.auto.sql b/TestApp/testapp.auto.sql new file mode 100755 index 0000000..b48fc4f --- /dev/null +++ b/TestApp/testapp.auto.sql @@ -0,0 +1,159 @@ + + ------------------------------------------------------------------------------------------------- + -- + -- Application Description Language Framework + -- + -- Database for application adltestapp version + -- Generated for MS-SQL 2000+ using adl2mssql.xslt 1.2 $ + -- + -- Code generator (c) 2007 Cygnet Solutions Ltd + -- + ------------------------------------------------------------------------------------------------- + + + use ADL_TestApp; + + + ------------------------------------------------------------------------------------------------- + -- authentication roles + ------------------------------------------------------------------------------------------------- + + execute sp_addrole @rolename = 'public' + + GO + + execute sp_addrole @rolename = 'admin' + + GO + + + ------------------------------------------------------------------------------------------------- + -- primary tables, views and permissions + ------------------------------------------------------------------------------------------------- + + + ------------------------------------------------------------------------------------------------- + -- primary table person + ------------------------------------------------------------------------------------------------- + CREATE TABLE "person" + ( + + "person_Id" INT IDENTITY( 1, 1), + "LastName" VARCHAR( 100) NOT NULL, + "ForeNames" VARCHAR( 100) NOT NULL, + "Partner" INT, + "Gender" VARCHAR( 1) NOT NULL, + "age" INT , + "Address" VARCHAR( 8) + , + PRIMARY KEY( "person_Id") + + ) + + GO + + ---- permissions ------------------------------------------------------------------------------ + + REVOKE ALL ON "person" FROM public + GO + + + REVOKE ALL ON "person" FROM admin + GO + + + + ------------------------------------------------------------------------------------------------- + -- primary table address + ------------------------------------------------------------------------------------------------- + CREATE TABLE "address" + ( + + "Number" VARCHAR( 8) , + "Postcode" VARCHAR( 10) , + "Address1" VARCHAR( 255) NOT NULL, + "Address2" VARCHAR( 255) , + "Address3" VARCHAR( 255) , + "City" VARCHAR( 255) , + "County" VARCHAR( 255) + , + PRIMARY KEY( "Number", "Postcode") + + ) + + GO + + ---- permissions ------------------------------------------------------------------------------ + + + ------------------------------------------------------------------------------------------------- + -- link tables + ------------------------------------------------------------------------------------------------- + + -- Problems with responsibility for generating link tables: + -- @entity = person + -- $nearside = person + -- $farside = person_1 + -- farlink = Friends + -- comparison = '0' + -- my responsibility = true + + ------------------------------------------------------------------------------------------------- + -- link table joining person with person + ------------------------------------------------------------------------------------------------- + CREATE TABLE "LN_person_person" + ( + "personLink" INT NOT NULL, + "person_1Link" INT NOT NULL + ) + + GO + + + + ---- permissions ------------------------------------------------------------------------------ + + REVOKE ALL ON LN_person_person FROM public + GO + + REVOKE ALL ON LN_person_person FROM admin + GO + + + ---- referential integrity -------------------------------------------------------------------- + + + ALTER TABLE "LN_person_person" + ADD FOREIGN KEY ( "personLink") + REFERENCES "person" ON DELETE NO ACTION + + GO + + ALTER TABLE "LN_person_person" + ADD FOREIGN KEY ( "person_1Link") + REFERENCES "person" ON DELETE CASCADE + + GO + + + ------------------------------------------------------------------------------------------------- + -- primary referential integrity constraints + ------------------------------------------------------------------------------------------------- + + ALTER TABLE "person" + ADD FOREIGN KEY ( "Partner") + REFERENCES "person" ON DELETE NO ACTION + + GO + + ALTER TABLE "person" + ADD FOREIGN KEY ( "Address") + REFERENCES "address" ON DELETE NO ACTION + + GO + + + ------------------------------------------------------------------------------------------------- + -- end of file + ------------------------------------------------------------------------------------------------- + \ No newline at end of file