diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-04-13 16:04:56 +0200 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-04-13 16:04:56 +0200 |
commit | 47e7f56a52870bdb278225fc05866efcb5e65a1d (patch) | |
tree | 1b35d2b9e25a375cbc256fc406c0d55ac979f120 /sqlparse/engine | |
parent | ea2b23a46b4dacf1d76cdbdaa172e25e3b733466 (diff) | |
download | sqlparse-47e7f56a52870bdb278225fc05866efcb5e65a1d.tar.gz |
Don't group trailing whitepsace in WHERE clauses (fixes issue35).
Diffstat (limited to 'sqlparse/engine')
-rw-r--r-- | sqlparse/engine/grouping.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 3a2e3c3..d233772 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -253,7 +253,8 @@ def group_where(tlist): else: end = tlist.tokens[tlist.token_index(end) - 1] group = tlist.group_tokens(sql.Where, - tlist.tokens_between(token, end)) + tlist.tokens_between(token, end), + ignore_ws=True) idx = tlist.token_index(group) token = tlist.token_next_match(idx, T.Keyword, 'WHERE') |