1
0
Fork 0

Merging upstream version 26.9.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-09 08:41:51 +01:00
parent cfc68ba563
commit 5699f7334e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
43 changed files with 27039 additions and 26675 deletions

View file

@ -210,6 +210,7 @@ class Generator(metaclass=_Generator):
exp.WithProcedureOptions: lambda self, e: f"WITH {self.expressions(e, flat=True)}",
exp.WithSchemaBindingProperty: lambda self, e: f"WITH SCHEMA {self.sql(e, 'this')}",
exp.WithOperator: lambda self, e: f"{self.sql(e, 'this')} WITH {self.sql(e, 'op')}",
exp.ForceProperty: lambda *_: "FORCE",
}
# Whether null ordering is supported in order by
@ -467,6 +468,7 @@ class Generator(metaclass=_Generator):
exp.DataType.Type.MEDIUMTEXT: "TEXT",
exp.DataType.Type.LONGTEXT: "TEXT",
exp.DataType.Type.TINYTEXT: "TEXT",
exp.DataType.Type.BLOB: "VARBINARY",
exp.DataType.Type.MEDIUMBLOB: "BLOB",
exp.DataType.Type.LONGBLOB: "BLOB",
exp.DataType.Type.TINYBLOB: "BLOB",
@ -584,6 +586,7 @@ class Generator(metaclass=_Generator):
exp.SqlReadWriteProperty: exp.Properties.Location.POST_SCHEMA,
exp.SqlSecurityProperty: exp.Properties.Location.POST_CREATE,
exp.StabilityProperty: exp.Properties.Location.POST_SCHEMA,
exp.StorageHandlerProperty: exp.Properties.Location.POST_SCHEMA,
exp.StreamingTableProperty: exp.Properties.Location.POST_CREATE,
exp.StrictProperty: exp.Properties.Location.POST_SCHEMA,
exp.Tags: exp.Properties.Location.POST_WITH,
@ -600,6 +603,7 @@ class Generator(metaclass=_Generator):
exp.WithProcedureOptions: exp.Properties.Location.POST_SCHEMA,
exp.WithSchemaBindingProperty: exp.Properties.Location.POST_SCHEMA,
exp.WithSystemVersioningProperty: exp.Properties.Location.POST_SCHEMA,
exp.ForceProperty: exp.Properties.Location.POST_CREATE,
}
# Keywords that can't be used as unquoted identifier names
@ -4846,3 +4850,10 @@ class Generator(metaclass=_Generator):
def show_sql(self, expression: exp.Show) -> str:
self.unsupported("Unsupported SHOW statement")
return ""
def put_sql(self, expression: exp.Put) -> str:
props = expression.args.get("properties")
props_sql = self.properties(props, prefix=" ", sep=" ", wrapped=False) if props else ""
this = self.sql(expression, "this")
target = self.sql(expression, "target")
return f"PUT {this} {target}{props_sql}"