Reintroduce sealed interfaces for generated DB types

This commit is contained in:
Tamas Vajk
2021-11-15 16:24:53 +01:00
committed by Ian Lynagh
parent c4ad2f3463
commit cb406619cb
2 changed files with 5 additions and 1 deletions

View File

@@ -171,7 +171,7 @@ with open('src/main/kotlin/KotlinExtractorDbScheme.kt', 'w') as kt:
genTable(kt, relname, columns, enum, kind, num, typ)
for typ in sorted(supertypes):
kt.write('interface Db' + upperFirst(typ))
kt.write('sealed interface Db' + upperFirst(typ))
# Sorting makes the output deterministic.
names = sorted(supertypes[typ])
if names: