1
0
Fork 0

Adding upstream version 11.3.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:42:50 +01:00
parent fe959b0137
commit 2f30828945
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
62 changed files with 28339 additions and 27272 deletions

View file

@ -13,10 +13,6 @@ from sqlglot.dialects.dialect import (
from sqlglot.tokens import TokenType
def _fetch_sql(self, expression):
return self.limit_sql(exp.Limit(expression=expression.args.get("count")))
# https://www.sqlite.org/lang_aggfunc.html#group_concat
def _group_concat_sql(self, expression):
this = expression.this
@ -94,9 +90,17 @@ class SQLite(Dialect):
exp.TimeStrToTime: lambda self, e: self.sql(e, "this"),
exp.TryCast: no_trycast_sql,
exp.GroupConcat: _group_concat_sql,
exp.Fetch: _fetch_sql,
}
def fetch_sql(self, expression):
return self.limit_sql(exp.Limit(expression=expression.args.get("count")))
def least_sql(self, expression):
if len(expression.expressions) > 1:
return rename_func("MIN")(self, expression)
return self.expressions(expression)
def transaction_sql(self, expression):
this = expression.this
this = f" {this}" if this else ""