diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2009-09-12 08:05:34 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2009-09-12 08:05:34 +0200 |
| commit | 3d13c5d4bb14f76d407285f2a91e7061585fd6da (patch) | |
| tree | 8816cdae40c231eb4da4c4ae8d49befb1f05e854 /sqlparse/engine | |
| parent | 29590e09223ca9eb44e15429488664cff9db5f9e (diff) | |
| download | sqlparse-3d13c5d4bb14f76d407285f2a91e7061585fd6da.tar.gz | |
Prevent WHERE grouper from consuming closing parenthesis (fixes issue9, reported by estama).
Diffstat (limited to 'sqlparse/engine')
| -rw-r--r-- | sqlparse/engine/grouping.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index d30031f..a03c0b4 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -231,7 +231,7 @@ def group_where(tlist): tidx = tlist.token_index(token) end = tlist.token_next_match(tidx+1, T.Keyword, stopwords) if end is None: - end = tlist.tokens[-1] + end = tlist._groupable_tokens[-1] else: end = tlist.tokens[tlist.token_index(end)-1] group = tlist.group_tokens(Where, tlist.tokens_between(token, end)) |
