Merging upstream version 11.5.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b9525af810
commit
9782c88c58
106 changed files with 25262 additions and 24200 deletions
|
@ -466,6 +466,12 @@ class Generator:
|
|||
if part
|
||||
)
|
||||
|
||||
def columnposition_sql(self, expression: exp.ColumnPosition) -> str:
|
||||
this = self.sql(expression, "this")
|
||||
this = f" {this}" if this else ""
|
||||
position = self.sql(expression, "position")
|
||||
return f"{position}{this}"
|
||||
|
||||
def columndef_sql(self, expression: exp.ColumnDef) -> str:
|
||||
column = self.sql(expression, "this")
|
||||
kind = self.sql(expression, "kind")
|
||||
|
@ -473,8 +479,10 @@ class Generator:
|
|||
exists = "IF NOT EXISTS " if expression.args.get("exists") else ""
|
||||
kind = f" {kind}" if kind else ""
|
||||
constraints = f" {constraints}" if constraints else ""
|
||||
position = self.sql(expression, "position")
|
||||
position = f" {position}" if position else ""
|
||||
|
||||
return f"{exists}{column}{kind}{constraints}"
|
||||
return f"{exists}{column}{kind}{constraints}{position}"
|
||||
|
||||
def columnconstraint_sql(self, expression: exp.ColumnConstraint) -> str:
|
||||
this = self.sql(expression, "this")
|
||||
|
@ -1591,6 +1599,11 @@ class Generator:
|
|||
exp.Case(ifs=[expression.copy()], default=expression.args.get("false"))
|
||||
)
|
||||
|
||||
def matchagainst_sql(self, expression: exp.MatchAgainst) -> str:
|
||||
modifier = expression.args.get("modifier")
|
||||
modifier = f" {modifier}" if modifier else ""
|
||||
return f"{self.func('MATCH', *expression.expressions)} AGAINST({self.sql(expression, 'this')}{modifier})"
|
||||
|
||||
def jsonkeyvalue_sql(self, expression: exp.JSONKeyValue) -> str:
|
||||
return f"{self.sql(expression, 'this')}: {self.sql(expression, 'expression')}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue