replace '#' by '+' in graph definition
[erdiag.git] / example.html
1 <h2>MCD graph:</h3>
2 <div id="mcd"></div>
3
4 <h2>MLD graph:</h2>
5 <div id="mld"></div>
6
7 <h2>SQL instructions:</h2>
8 <div id="sql"></div>
9
10 <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
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 `);
40 er.drawMcd("mcd"); //,"bubble"
41 er.drawMld("mld");
42 er.fillSql("sql");
43 </script>