diff options
Diffstat (limited to 'sqlparse/engine/grouping.py')
| -rw-r--r-- | sqlparse/engine/grouping.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 73679e3..a317044 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -159,16 +159,17 @@ def group_identifier(tlist): lambda y: (y.match(T.Punctuation, '.') or y.ttype in (T.Operator, T.Wildcard, - T.ArrayIndex, - T.Name)), + T.Name) + or isinstance(y, sql.SquareBrackets)), lambda y: (y.ttype in (T.String.Symbol, T.Name, T.Wildcard, - T.ArrayIndex, T.Literal.String.Single, T.Literal.Number.Integer, T.Literal.Number.Float) - or isinstance(y, (sql.Parenthesis, sql.Function))))) + or isinstance(y, (sql.Parenthesis, + sql.SquareBrackets, + sql.Function))))) for t in tl.tokens[i:]: # Don't take whitespaces into account. if t.ttype is T.Whitespace: |
