Merging upstream version 18.13.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
a56b8dde5c
commit
320822f1c4
76 changed files with 21248 additions and 19605 deletions
|
@ -1226,9 +1226,10 @@ class Generator:
|
|||
kind = expression.args.get("kind")
|
||||
this = f" {self.sql(expression, 'this')}" if expression.this else ""
|
||||
for_or_in = expression.args.get("for_or_in")
|
||||
for_or_in = f" {for_or_in}" if for_or_in else ""
|
||||
lock_type = expression.args.get("lock_type")
|
||||
override = " OVERRIDE" if expression.args.get("override") else ""
|
||||
return f"LOCKING {kind}{this} {for_or_in} {lock_type}{override}"
|
||||
return f"LOCKING {kind}{this}{for_or_in} {lock_type}{override}"
|
||||
|
||||
def withdataproperty_sql(self, expression: exp.WithDataProperty) -> str:
|
||||
data_sql = f"WITH {'NO ' if expression.args.get('no') else ''}DATA"
|
||||
|
@ -2179,13 +2180,21 @@ class Generator:
|
|||
)
|
||||
|
||||
def jsoncolumndef_sql(self, expression: exp.JSONColumnDef) -> str:
|
||||
path = self.sql(expression, "path")
|
||||
path = f" PATH {path}" if path else ""
|
||||
nested_schema = self.sql(expression, "nested_schema")
|
||||
|
||||
if nested_schema:
|
||||
return f"NESTED{path} {nested_schema}"
|
||||
|
||||
this = self.sql(expression, "this")
|
||||
kind = self.sql(expression, "kind")
|
||||
kind = f" {kind}" if kind else ""
|
||||
path = self.sql(expression, "path")
|
||||
path = f" PATH {path}" if path else ""
|
||||
return f"{this}{kind}{path}"
|
||||
|
||||
def jsonschema_sql(self, expression: exp.JSONSchema) -> str:
|
||||
return self.func("COLUMNS", *expression.expressions)
|
||||
|
||||
def jsontable_sql(self, expression: exp.JSONTable) -> str:
|
||||
this = self.sql(expression, "this")
|
||||
path = self.sql(expression, "path")
|
||||
|
@ -2194,9 +2203,9 @@ class Generator:
|
|||
error_handling = f" {error_handling}" if error_handling else ""
|
||||
empty_handling = expression.args.get("empty_handling")
|
||||
empty_handling = f" {empty_handling}" if empty_handling else ""
|
||||
columns = f" COLUMNS ({self.expressions(expression, skip_first=True)})"
|
||||
schema = self.sql(expression, "schema")
|
||||
return self.func(
|
||||
"JSON_TABLE", this, suffix=f"{path}{error_handling}{empty_handling}{columns})"
|
||||
"JSON_TABLE", this, suffix=f"{path}{error_handling}{empty_handling} {schema})"
|
||||
)
|
||||
|
||||
def openjsoncolumndef_sql(self, expression: exp.OpenJSONColumnDef) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue