summaryrefslogtreecommitdiffstats
path: root/sqlglot/generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/generator.py')
-rw-r--r--sqlglot/generator.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/sqlglot/generator.py b/sqlglot/generator.py
index 1479e28..18ae42a 100644
--- a/sqlglot/generator.py
+++ b/sqlglot/generator.py
@@ -84,6 +84,7 @@ class Generator:
exp.CollateColumnConstraint: lambda self, e: f"COLLATE {self.sql(e, 'this')}",
exp.EncodeColumnConstraint: lambda self, e: f"ENCODE {self.sql(e, 'this')}",
exp.DefaultColumnConstraint: lambda self, e: f"DEFAULT {self.sql(e, 'this')}",
+ exp.InlineLengthColumnConstraint: lambda self, e: f"INLINE LENGTH {self.sql(e, 'this')}",
}
# Whether 'CREATE ... TRANSIENT ... TABLE' is allowed
@@ -445,6 +446,14 @@ class Generator:
def autoincrementcolumnconstraint_sql(self, _) -> str:
return self.token_sql(TokenType.AUTO_INCREMENT)
+ def compresscolumnconstraint_sql(self, expression: exp.CompressColumnConstraint) -> str:
+ if isinstance(expression.this, list):
+ this = self.wrap(self.expressions(expression, key="this", flat=True))
+ else:
+ this = self.sql(expression, "this")
+
+ return f"COMPRESS {this}"
+
def generatedasidentitycolumnconstraint_sql(
self, expression: exp.GeneratedAsIdentityColumnConstraint
) -> str: