Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afea187 commit dbef421Copy full SHA for dbef421
1 file changed
java/kotlin-extractor/generate_dbscheme.py
@@ -42,7 +42,6 @@ def upperFirst(string):
42
s = type_hierarchy.get(typ, set())
43
s.add(name)
44
type_hierarchy[typ] = s
45
- kt.write('\n')
46
47
# tables
48
for relname, body in re.findall('\n([\w_]+)(\([^)]*\))',
@@ -84,11 +83,11 @@ def upperFirst(string):
84
83
kt.write(')\\n")\n')
85
kt.write('}\n')
86
87
- for typ in type_hierarchy:
+ for typ in sorted(type_hierarchy):
88
kt.write('sealed interface Db' + upperFirst(typ))
89
- names = type_hierarchy[typ]
+ names = sorted(type_hierarchy[typ])
90
if names:
91
kt.write(': ')
92
- kt.write(', '.join(map(lambda name: 'Db' + upperFirst(name), type_hierarchy[typ])))
+ kt.write(', '.join(map(lambda name: 'Db' + upperFirst(name), names)))
93
kt.write(' {}\n')
94
0 commit comments