File: schema.tt2

package info (click to toggle)
libsql-translator-perl 0.11024-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,572 kB
  • sloc: perl: 67,471; sql: 3,809; xml: 258; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[%# vim:ft=tt2 -%]
[% WRAPPER diagram.tt2 %]
    [% WRAPPER layer.tt2 name="Background" %]
        [% FOREACH table IN schema.get_tables %]
            [% INCLUDE 'uml-class-start.tt2'
                name       = table.name
                stereotype = 'Table'
                visible_operations = 'false'
            %]
              <dia:attribute name="attributes">
              [% FOREACH field IN table.get_fields;
                SET type = field.data_type;
                SET type = "$type($field.size)" IF field.size;
                INCLUDE "uml-attribute.tt2"
                    name       = field.name
                    stereotype = 'Field'
                    type       = type
                    value      = field.default_value
                ;
              END %]
              </dia:attribute>
              <dia:attribute name="operations"/>
              <dia:attribute name="template">
                <dia:boolean val="false"/>
              </dia:attribute>
              <dia:attribute name="templates"/>
            [% INCLUDE 'uml-class-end.tt2' %]
        [% END %]
    [% END %]
[% END %]