From f47957747ec6ed00a021e4e07402e703b1d9a94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Legan=C3=A9s=20Combarro?= Date: Wed, 23 May 2012 10:49:55 +0300 Subject: Compact function was doing too much things... --- sqlparse/filters.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sqlparse/filters.py b/sqlparse/filters.py index ce5dd85..c5165be 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -651,13 +651,11 @@ class Limit: return -1 -def Compact(sql, includePath="sql"): - """Function that return a compacted version of the input SQL query""" +def compact(stream): + """Function that return a compacted version of the stream""" pipe = Pipeline() - pipe.append(tokenize) - pipe.append(IncludeStatement(includePath)) pipe.append(StripComments()) pipe.append(StripWhitespace) - return pipe(sql) + return pipe(stream) -- cgit v1.2.1