From 5d69341822ca11f7b2cbe90101cddc316498b2c8 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Tue, 18 Mar 2014 20:01:17 +0100 Subject: Improve parsing of identifier lists containing placeholders. --- CHANGES | 3 +++ sqlparse/engine/grouping.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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', ])) -- cgit v1.2.1