From 62423c0d5e2e570341d5d0db74982712ff2348c7 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Thu, 2 Jun 2016 14:09:21 -0700 Subject: Remove undocumented features These features/function/classes were added for AntiORM. Quick look-up didn't show any usage outside of AntiORM. Closes #246 --- sqlparse/functions.py | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 sqlparse/functions.py (limited to 'sqlparse/functions.py') diff --git a/sqlparse/functions.py b/sqlparse/functions.py deleted file mode 100644 index e54457e..0000000 --- a/sqlparse/functions.py +++ /dev/null @@ -1,44 +0,0 @@ -''' -Created on 17/05/2012 - -@author: piranna - -Several utility functions to extract info from the SQL sentences -''' - -from sqlparse.filters import ColumnsSelect, Limit -from sqlparse.pipeline import Pipeline -from sqlparse.tokens import Keyword, Whitespace - - -def getlimit(stream): - """Function that return the LIMIT of a input SQL """ - pipe = Pipeline() - - pipe.append(Limit()) - - result = pipe(stream) - try: - return int(result) - except ValueError: - return result - - -def getcolumns(stream): - """Function that return the colums of a SELECT query""" - pipe = Pipeline() - - pipe.append(ColumnsSelect()) - - return pipe(stream) - - -class IsType(object): - """Functor that return is the statement is of a specific type""" - def __init__(self, type): - self.type = type - - def __call__(self, stream): - for token_type, value in stream: - if token_type not in Whitespace: - return token_type in Keyword and value == self.type -- cgit v1.2.1