From: Benjamin Auder Date: Mon, 12 Feb 2018 19:09:15 +0000 (+0100) Subject: after merge with remote X-Git-Url: https://git.auder.net/?p=erdiag.git;a=commitdiff_plain;h=b06f8fe6700d326e5bfae39e01a6ec58c1f46680;hp=40b4a9d230d105a61e22bef0a63a6e8d515524e9 after merge with remote --- diff --git a/.gitignore b/.gitignore index 1377554..6b59895 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.swp +#index.html for local tests +index.html diff --git a/example_MCD.svg b/example_MCD.svg new file mode 100644 index 0000000..4d6c1a1 --- /dev/null +++ b/example_MCD.svg @@ -0,0 +1,86 @@ + + + + + + +%3 + + + +Musician + +Musician + +id + +name + +band + +role + + + + +Play + +<Play> +event + + + +Musician:name--Play + +1,n + + + +Instrument + +Instrument + +name + +family + + + + +Guitar + +Guitar + +type + + + + +Instrument:name--Guitar:name + + + + + +Instrument:name--Play + +0,n + + + +Piano + +Piano + +type + + + + +Piano:name--Instrument:name + + + + + diff --git a/example_MLD.svg b/example_MLD.svg new file mode 100644 index 0000000..4f03c96 --- /dev/null +++ b/example_MLD.svg @@ -0,0 +1,96 @@ + + + + + + +%3 + + + +Instrument + +Instrument + +name + +family + + + + +Guitar + +Guitar + +type + +#Instrument_id + + + + +Instrument:name--Guitar:Instrument_id + + + + + +Piano + +Piano + +type + +#Instrument_id + + + + +Instrument:name--Piano:Instrument_id + + + + + +Musician + +Musician + +id + +name + +band + +role + + + + +Play + +Play + +#Musician_id + +#Instrument_name + +event + + + + +Play:Instrument_name--Instrument:name + + + + + +Play:Musician_id--Musician:id + + + + + diff --git a/parser.js b/parser.js index 2919c56..d6cee80 100644 --- a/parser.js +++ b/parser.js @@ -187,8 +187,13 @@ class ErDiags name: inh.parent + "_id", type: this.tables[inh.parent][idx].type, isKey: true, +<<<<<<< HEAD + qualifiers: (this.tables[inh.parent][idx].qualifiers || "") + " foreign key references " + inh.parent, + ref: inh.parent, +======= qualifiers: this.tables[inh.parent][idx].qualifiers || "", ref: inh.parent + "(" + this.tables[inh.parent][idx].name + ")", +>>>>>>> 40b4a9d230d105a61e22bef0a63a6e8d515524e9 }); }); }); diff --git a/tata b/tata new file mode 100644 index 0000000..105a26e --- /dev/null +++ b/tata @@ -0,0 +1,32 @@ +graph { +node [shape=plaintext]; +"Instrument" [label=< + + + +
Instrument
name
family
>]; +"Piano" [label=< + + +
Piano
type
>]; +"Guitar" [label=< + + +
Guitar
type
>]; +"Play" [label=< + + + + +
Play
#Musician_id
#Instrument_name
event
>]; +"Musician" [label=< + + + + + +
Musician
id
name
band
role
>]; +"Play":"Musician_id" -- "Musician":__key +"Instrument":__key -- ""Play":"Instrument_name" + +}