Fix bugs, MLD graphs now seem well generated
[erdiag.git] / example.html
CommitLineData
b8af38fd 1<h2>MCD graph:</h3>
20bccb53 2<div id="mcd"></div>
b8af38fd
BA
3
4<h2>MLD graph:</h2>
20bccb53 5<div id="mld"></div>
525c4d2a 6
b8af38fd
BA
7<h2>SQL instructions:</h2>
8<div id="sql"></div>
9
48a55161 10<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
525c4d2a
BA
11<script src="parser.js"></script>
12<script>
13 let er =
14 new ErDiags(`
15 [Musician]
16 #id (integer)
17 name
18 band
19 role (varchar not null)
20
21 [Instrument]
22 #name
23 family (varchar not null default "Brass")
24
25 [Piano]
26 type
27
28 [Guitar]
29 type
30
31 {Play}
32 Musician +
33 Instrument *
34 --
35 event
36
37 is_a
38 Instrument Piano Guitar
39 `);
20bccb53
BA
40 er.drawMcd("mcd"); //,"bubble"
41 er.drawMld("mld");
b8af38fd 42 er.fillSql("sql");
525c4d2a 43</script>