1
0
Fork 0

Merging upstream version 11.3.6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:44:58 +01:00
parent f5f7767f8d
commit e33f287a97
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
46 changed files with 23416 additions and 22639 deletions

View file

@ -301,8 +301,6 @@ class MySQL(Dialect):
"READ ONLY",
}
INTEGER_DIVISION = False
def _parse_show_mysql(self, this, target=False, full=None, global_=None):
if target:
if isinstance(target, str):
@ -435,7 +433,6 @@ class MySQL(Dialect):
class Generator(generator.Generator):
LOCKING_READS_SUPPORTED = True
NULL_ORDERING_SUPPORTED = False
INTEGER_DIVISION = False
TRANSFORMS = {
**generator.Generator.TRANSFORMS, # type: ignore
@ -446,6 +443,7 @@ class MySQL(Dialect):
exp.TableSample: no_tablesample_sql,
exp.TryCast: no_trycast_sql,
exp.DateAdd: _date_add_sql("ADD"),
exp.DateDiff: lambda self, e: f"DATEDIFF({self.format_args(e.this, e.expression)})",
exp.DateSub: _date_add_sql("SUB"),
exp.DateTrunc: _date_trunc_sql,
exp.DayOfWeek: rename_func("DAYOFWEEK"),