diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-03-18 20:01:17 +0100 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-03-18 20:01:17 +0100 |
commit | 5d69341822ca11f7b2cbe90101cddc316498b2c8 (patch) | |
tree | 16ac4374a05da77e592cb83ca7b8b1828dec34a7 | |
parent | fb56a27601b7e628f2c3a415fb260ddefcb0f88d (diff) | |
download | sqlparse-5d69341822ca11f7b2cbe90101cddc316498b2c8.tar.gz |
Improve parsing of identifier lists containing placeholders.
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | sqlparse/engine/grouping.py | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -5,6 +5,9 @@ Bug Fixes * Fix handling of NULL keywords in aliased identifiers. * Fix SerializerUnicode to split unquoted newlines (issue131, by Michael Schuller). +Enhancements +* Improve parsing of identifier lists containing placeholders. + Release 0.1.11 (Feb 07, 2014) ----------------------------- diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index bd97f41..8236c49 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -136,7 +136,7 @@ def group_comparison(tlist): def _parts_valid(token): return (token.ttype in (T.String.Symbol, T.Name, T.Number, T.Number.Integer, T.Literal, - T.Literal.Number.Integer) + T.Literal.Number.Integer, T.Name.Placeholder) or isinstance(token, (sql.Identifier, sql.Parenthesis)) or (token.ttype is T.Keyword and token.value.upper() in ['NULL', ])) |