summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2014-03-18 20:01:17 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2014-03-18 20:01:17 +0100
commit5d69341822ca11f7b2cbe90101cddc316498b2c8 (patch)
tree16ac4374a05da77e592cb83ca7b8b1828dec34a7
parentfb56a27601b7e628f2c3a415fb260ddefcb0f88d (diff)
downloadsqlparse-5d69341822ca11f7b2cbe90101cddc316498b2c8.tar.gz
Improve parsing of identifier lists containing placeholders.
-rw-r--r--CHANGES3
-rw-r--r--sqlparse/engine/grouping.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 1185f3a..85adb4a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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', ]))