Skip to content

Commit 3942d09

Browse files
committed
Properly group placeholders in identifier lists (fixes andialbrecht#52).
1 parent fb9ba15 commit 3942d09

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGES

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ Development
22
-----------
33

44
Bug Fixes
5-
* Avoid "stair case" effects when identifiers, functions or keywords
6-
are mixed in identifier lists (issue45, issue49) and when asterisks
7-
are used as operators (issue58).
5+
* Avoid "stair case" effects when identifiers, functions,
6+
placeholders or keywords are mixed in identifier lists (issue45,
7+
issue49, issue52) and when asterisks are used as operators
8+
(issue58).
89
* Make keyword detection more restrict (issue47).
910
* Improve handling of CASE statements (issue46).
1011
* Fix statement splitting when parsing recursive statements (issue57,

sqlparse/engine/grouping.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def group_identifier_list(tlist):
197197
lambda t: t.match(T.Keyword, 'role'),
198198
lambda t: t.ttype == T.Number.Integer,
199199
lambda t: t.ttype == T.String.Single,
200+
lambda t: t.ttype == T.Name.Placeholder,
200201
lambda t: isinstance(t, sql.Comparison),
201202
lambda t: isinstance(t, sql.Comment),
202203
]

0 commit comments

Comments
 (0)