Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
klahnakoski committed May 31, 2024
1 parent fe45f61 commit e12cebb
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions mo_sql_parsing/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
RIGHT_ASSOC,
LEFT_ASSOC,
Keyword,
Combine, Empty,
Combine,
Empty,
)

from mo_sql_parsing.keywords import (
Expand Down Expand Up @@ -272,13 +273,11 @@ def get_column_type(expr, identifier, literal_string):
identifier("name") + (column_type | identifier("type")) + ZeroOrMore(column_options)
) / to_flat_column_type

variable_options = (
assign("default", expr)
| EQ + expr("default")
variable_options = assign("default", expr) | EQ + expr("default")
declare_variable = assign(
"declare",
delimited_list(Group(identifier("name") + Optional(AS) + simple_types("type") + ZeroOrMore(variable_options))),
)
declare_variable = assign("declare", delimited_list(Group(
identifier("name") + Optional(AS) + simple_types("type") + ZeroOrMore(variable_options)
)))

set_parser_names()

Expand Down

0 comments on commit e12cebb

Please sign in to comment.