We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8442831 commit 234879fCopy full SHA for 234879f
piccolo/columns/base.py
@@ -462,15 +462,16 @@ def get_sql_value(self, value: t.Any) -> t.Any:
462
463
return output
464
465
+ @property
466
+ def column_type(self):
467
+ return self.__class__.__name__.upper()
468
+
469
@property
470
def querystring(self) -> QueryString:
471
"""
472
Used when creating tables.
473
- column_type = getattr(
- self, "column_type", self.__class__.__name__.upper()
- )
- query = f'"{self._meta.name}" {column_type}'
474
+ query = f'"{self._meta.name}" {self.column_type}'
475
if self._meta.primary:
476
query += " PRIMARY"
477
if self._meta.key:
0 commit comments