diff options
Diffstat (limited to '')
-rw-r--r-- | sqlglot/generator.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sqlglot/generator.py b/sqlglot/generator.py index a445178..d264e59 100644 --- a/sqlglot/generator.py +++ b/sqlglot/generator.py @@ -748,6 +748,9 @@ class Generator: def structkwarg_sql(self, expression): return f"{self.sql(expression, 'this')} {self.sql(expression, 'expression')}" + def parameter_sql(self, expression): + return f"@{self.sql(expression, 'this')}" + def placeholder_sql(self, *_): return "?" @@ -903,7 +906,7 @@ class Generator: return f"UNIQUE ({columns})" def if_sql(self, expression): - return self.case_sql(exp.Case(ifs=[expression], default=expression.args.get("false"))) + return self.case_sql(exp.Case(ifs=[expression.copy()], default=expression.args.get("false"))) def in_sql(self, expression): query = expression.args.get("query") |