diff options
Diffstat (limited to 'sqlglot/expressions.py')
-rw-r--r-- | sqlglot/expressions.py | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/sqlglot/expressions.py b/sqlglot/expressions.py index c7d4664..db94a37 100644 --- a/sqlglot/expressions.py +++ b/sqlglot/expressions.py @@ -1301,7 +1301,14 @@ class Constraint(Expression): class Delete(Expression): - arg_types = {"with": False, "this": False, "using": False, "where": False, "returning": False} + arg_types = { + "with": False, + "this": False, + "using": False, + "where": False, + "returning": False, + "limit": False, + } def delete( self, @@ -1844,6 +1851,10 @@ class CollateProperty(Property): arg_types = {"this": True} +class CopyGrantsProperty(Property): + arg_types = {} + + class DataBlocksizeProperty(Property): arg_types = { "size": False, @@ -2245,6 +2256,16 @@ QUERY_MODIFIERS = { } +# https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-ver16 +class WithTableHint(Expression): + arg_types = {"expressions": True} + + +# https://dev.mysql.com/doc/refman/8.0/en/index-hints.html +class IndexTableHint(Expression): + arg_types = {"this": True, "expressions": False, "target": False} + + class Table(Expression): arg_types = { "this": True, @@ -2402,6 +2423,7 @@ class Update(Expression): "from": False, "where": False, "returning": False, + "limit": False, } @@ -2434,8 +2456,6 @@ class Select(Subqueryable): "expressions": False, "hint": False, "distinct": False, - "struct": False, # https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#return_query_results_as_a_value_table - "value": False, "into": False, "from": False, **QUERY_MODIFIERS, @@ -3223,15 +3243,15 @@ class Star(Expression): return self.name -class Parameter(Expression): +class Parameter(Condition): arg_types = {"this": True, "wrapped": False} -class SessionParameter(Expression): +class SessionParameter(Condition): arg_types = {"this": True, "kind": False} -class Placeholder(Expression): +class Placeholder(Condition): arg_types = {"this": False, "kind": False} @@ -3333,6 +3353,7 @@ class DataType(Expression): UINT128 = auto() UINT256 = auto() UNIQUEIDENTIFIER = auto() + USERDEFINED = "USER-DEFINED" UUID = auto() VARBINARY = auto() VARCHAR = auto() |