diff options
Diffstat (limited to '')
-rw-r--r-- | sqlglot/expressions.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sqlglot/expressions.py b/sqlglot/expressions.py index 98afddc..1c3d42a 100644 --- a/sqlglot/expressions.py +++ b/sqlglot/expressions.py @@ -1321,7 +1321,13 @@ class GeneratedAsIdentityColumnConstraint(ColumnConstraintKind): # https://dev.mysql.com/doc/refman/8.0/en/create-table.html class IndexColumnConstraint(ColumnConstraintKind): - arg_types = {"this": False, "schema": True, "kind": False, "type": False, "options": False} + arg_types = { + "this": False, + "schema": True, + "kind": False, + "index_type": False, + "options": False, + } class InlineLengthColumnConstraint(ColumnConstraintKind): @@ -1354,7 +1360,7 @@ class TitleColumnConstraint(ColumnConstraintKind): class UniqueColumnConstraint(ColumnConstraintKind): - arg_types = {"this": False} + arg_types = {"this": False, "index_type": False} class UppercaseColumnConstraint(ColumnConstraintKind): @@ -4366,6 +4372,10 @@ class Extract(Func): arg_types = {"this": True, "expression": True} +class Timestamp(Func): + arg_types = {"this": False, "expression": False} + + class TimestampAdd(Func, TimeUnit): arg_types = {"this": True, "expression": True, "unit": False} @@ -4579,6 +4589,11 @@ class JSONArrayContains(Binary, Predicate, Func): _sql_names = ["JSON_ARRAY_CONTAINS"] +class ParseJSON(Func): + # BigQuery, Snowflake have PARSE_JSON, Presto has JSON_PARSE + _sql_names = ["PARSE_JSON", "JSON_PARSE"] + + class Least(Func): arg_types = {"this": True, "expressions": False} is_var_len_args = True |