summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Leganés Combarro <piranna@gmail.com>2012-05-23 10:49:55 +0300
committerJesús Leganés Combarro <piranna@gmail.com>2012-05-23 10:49:55 +0300
commitf47957747ec6ed00a021e4e07402e703b1d9a94c (patch)
treeafc92313843a9e24da0cc7f595038e55094ef1ca
parent26986faad381f72078921d15f777024ff88fd15c (diff)
downloadsqlparse-f47957747ec6ed00a021e4e07402e703b1d9a94c.tar.gz
Compact function was doing too much things...
-rw-r--r--sqlparse/filters.py8
1 files 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)