Skip to content

Commit 197ea5b

Browse files
committed
Swift: use more @Property in codegen
1 parent 71f9b25 commit 197ea5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

swift/codegen/lib/dbscheme.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ class DbColumn:
1616
binding: bool = False
1717
first: bool = False
1818

19+
@property
1920
def name(self):
2021
if self.schema_name in dbscheme_keywords:
2122
return self.schema_name + "_"
2223
return self.schema_name
2324

25+
@property
2426
def lhstype(self):
2527
if self.type[0] == "@":
2628
return "unique int" if self.binding else "int"
2729
return self.type
2830

31+
@property
2932
def rhstype(self):
3033
if self.type[0] == "@" and self.binding:
3134
return self.type

0 commit comments

Comments
 (0)