1
0
Fork 0

Adding upstream version 26.6.0.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
Daniel Baumann 2025-02-13 22:07:36 +01:00
parent cfc058b43a
commit 4b797b16f0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
99 changed files with 40433 additions and 38803 deletions

View file

@ -637,7 +637,7 @@ class Expression(metaclass=_Expression):
if not root:
root = new_node
elif new_node is not node:
elif parent and arg_key and new_node is not node:
parent.set(arg_key, new_node, index)
assert root
@ -1675,6 +1675,8 @@ class ColumnDef(Expression):
"constraints": False,
"exists": False,
"position": False,
"default": False,
"output": False,
}
@property
@ -2064,6 +2066,11 @@ class Drop(Expression):
return kind and kind.upper()
# https://cloud.google.com/bigquery/docs/reference/standard-sql/export-statements
class Export(Expression):
arg_types = {"this": True, "connection": False, "options": True}
class Filter(Expression):
arg_types = {"this": True, "expression": True}
@ -3245,7 +3252,7 @@ class Table(Expression):
@property
def name(self) -> str:
if isinstance(self.this, Func):
if not self.this or isinstance(self.this, Func):
return ""
return self.this.name
@ -4469,7 +4476,6 @@ class DataType(Expression):
UMEDIUMINT = auto()
UDECIMAL = auto()
UNION = auto()
UNIQUEIDENTIFIER = auto()
UNKNOWN = auto() # Sentinel value, useful for type annotation
USERDEFINED = "USER-DEFINED"
USMALLINT = auto()
@ -5518,6 +5524,7 @@ class Cast(Func):
"format": False,
"safe": False,
"action": False,
"default": False,
}
@property
@ -5628,6 +5635,10 @@ class CurrentTimestamp(Func):
arg_types = {"this": False, "sysdate": False}
class CurrentSchema(Func):
arg_types = {"this": False}
class CurrentUser(Func):
arg_types = {"this": False}
@ -5636,6 +5647,10 @@ class DateAdd(Func, IntervalOp):
arg_types = {"this": True, "expression": True, "unit": False}
class DateBin(Func, IntervalOp):
arg_types = {"this": True, "expression": True, "unit": False, "zone": False}
class DateSub(Func, IntervalOp):
arg_types = {"this": True, "expression": True, "unit": False}
@ -6064,6 +6079,11 @@ class JSONObjectAgg(AggFunc):
}
# https://www.postgresql.org/docs/9.5/functions-aggregate.html
class JSONBObjectAgg(AggFunc):
arg_types = {"this": True, "expression": True}
# https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/JSON_ARRAY.html
class JSONArray(Func):
arg_types = {