diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-12 10:17:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-12 10:17:16 +0000 |
commit | 7457677bc603569692329e39a59ccb018306e2a6 (patch) | |
tree | bb16c8f909bfbf7ff272cd8ef14a413c47b203fe /sqlglot/dialects/mysql.py | |
parent | Releasing debian version 11.3.3-1. (diff) | |
download | sqlglot-7457677bc603569692329e39a59ccb018306e2a6.tar.xz sqlglot-7457677bc603569692329e39a59ccb018306e2a6.zip |
Merging upstream version 11.3.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/mysql.py')
-rw-r--r-- | sqlglot/dialects/mysql.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py index 3531f59..a831235 100644 --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -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"), |