def extractFromSQLFile(self, filePointer, delimiter="<STR_LIT:;>"):
data = filePointer.read()<EOL>dataLines = []<EOL>dataLinesIndex = <NUM_LIT:0><EOL>for c in data:<EOL><INDENT>if len(dataLines) - <NUM_LIT:1> < dataLinesIndex:<EOL><INDENT>dataLines.append("<STR_LIT>")<EOL><DEDENT>if c == "<STR_LIT:\r\n>" or c == "<STR_LIT:\r>" or c == "<STR_LIT:\n>":<EOL><INDENT>dataLinesIndex += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>dataLines[dataLinesIndex] = "<STR_LIT>".format(<EOL>dataLines[dataLinesIndex],<EOL>c<EOL>)<EOL><DEDENT><DEDENT>statements = []<EOL>statementsIndex = <NUM_LIT:0><EOL>for line in dataLines:<EOL><INDENT>if line.startswith("<STR_LIT>") or line.startswith("<STR_LIT:#>"):<EOL><INDENT>continue<EOL><DEDENT>line = line.strip()<EOL>if len(line) == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>for c in line:<EOL><INDENT>if len(statements) - <NUM_LIT:1> < statementsIndex:<EOL><INDENT>statements.append("<STR_LIT>")<EOL><DEDENT>statements[statementsIndex] = "<STR_LIT>".format(<EOL>statements[statementsIndex],<EOL>c<EOL>)<EOL>if c == delimiter:<EOL><INDENT>statementsIndex += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return statements<EOL>
Process an SQL file and extract all the queries sorted.

:param filePointer: <io.TextIOWrapper> file pointer to SQL file
:return: <list> list of queries