diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2015-07-28 20:24:06 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2015-07-28 20:24:06 +0200 |
| commit | 5d71c27e5194dfc8b8869f3170803e1d18bad6dc (patch) | |
| tree | 944522019decb4e54067efec4b2ec3c77ee8134b /sqlparse | |
| parent | 8987a3a6b540ea35bbb1f9c5f49f3306501289cd (diff) | |
| download | sqlparse-5d71c27e5194dfc8b8869f3170803e1d18bad6dc.tar.gz | |
Handle END IF correctly when splitting statements (fixes #194).
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/engine/filter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sqlparse/engine/filter.py b/sqlparse/engine/filter.py index e7ea0ec..f7dd264 100644 --- a/sqlparse/engine/filter.py +++ b/sqlparse/engine/filter.py @@ -51,6 +51,9 @@ class StatementFilter: return 1 return 0 + if unified in ('END IF', 'END FOR'): + return -1 + if unified == 'END': # Should this respect a preceeding BEGIN? # In CASE ... WHEN ... END this results in a split level -1. |
