File: tapkit.schema.yaml

package info (click to toggle)
kwalify 0.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,852 kB
  • ctags: 1,188
  • sloc: ruby: 8,446; xml: 172; makefile: 36; java: 36
file content (146 lines) | stat: -rw-r--r-- 3,944 bytes parent folder | download | duplicates (5)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
##
## Kwalify schema example for TapKit
##
## $Release: 0.7.2 $
## copyright(c) 2005-2010 kuwata-lab all rights reserved.
##

type: map
classname: Schema
mapping:
 "adapter_name":
    type: str
    enum:
      - DBI
      - CSV
      #- MySQL
      #- PostgreSQL
      #- OpenBase
 "connection":
    type: map
    classname: Connection
    mapping:
     "url":
        type: str
        required: yes
     "user":
        type: str
     "password":
        type: str
     "encoding":
        type: str
        enum:
          - jis
          - sjis
          - euc
     "path":
        type: str
 "entities":
    type: seq
    sequence:
      - type: map
        classname: Entity
        mapping:
         "name":
            type: str
            required: yes
            unique: yes
         "external_name":
            type: str
            required: yes
         "class_properties":
            type: seq
            required: yes
            sequence:
              - type: str
         "primary_key_attributes":
            type: seq
            required: yes
            sequence:
              - type: str
                unique: yes
         "attributes":
            type: seq
            required: yes
            sequence:
              - type: map
                classname: Attribute
                mapping:
                 "name":
                    type: str
                    required: yes
                    unique: yes
                 "column_name":
                    type: str
                    required: yes
                 "class_name":
                    type: str
                    enum:
                      - String
                      - Integer
                      - Float
                      - Date
                      - Time
                      - Timestamp
                      - Boolean
                 "external_type":
                    type: str
                    required: yes
                    enum:   [
                      char, character, varchar, char varying, character varying,
                      nchar, national char, national character,
                      national character varying, bit, bit varying, 
                      int, integer, smallint, interval,
                      numeric, decimal, dec, float, real, double presicion,
                      date, time, timestamp
                      ]
                 "allow_null":
                    type: bool
                 "read_only":
                    type: bool
                 "width":
                    type: int
                 "factory_method":
                    type: str
                 "convertion_method":
                    type: str
         "relationships":
            type: seq
            sequence:
              - type: map
                classname: Relationship
                mapping:
                 "name":
                    type: str
                    required: yes
                    unique: yes
                 "destination":
                    type: str
                    required: yes
                 "joins":
                    type: seq
                    required: yes
                    sequence:
                      - type: map
                        mapping:
                         "source":
                            type: str
                         "destination":
                            type: str
                 "join-semantic":
                    type: str
                    enum:
                      - inner
                      - left_outer
                      - right_outer
                      - full_outer
                 "to_many":
                    type: bool
                 "mandatory":
                    type: bool
                 "delete_rule":
                    type: str
                    enum:
                      - nullify
                      - cascade
                      - deny