@Test public void testExtraDelim() throws Exception { ScriptReader sr = new ScriptReader("BEGIN;declare \"SQL_CUR0x1e4ba50\" cursor with hold for select * from pg_proc;;fetch 1 in \"SQL_CUR0x1e4ba50\""); String result = sr.readStatement(); assertEquals("BEGIN", result); result = sr.readStatement(); assertEquals("declare \"SQL_CUR0x1e4ba50\" cursor with hold for select * from pg_proc", result); result = sr.readStatement(); assertEquals("fetch 1 in \"SQL_CUR0x1e4ba50\"", result); assertNull(sr.readStatement()); }
public String readStatement() throws IOException{ if (endOfFile) { return null; } while (true) { String result = readStatementLoop(); if (result != null || endOfFile) { return result; } } }
ScriptReader { public String readStatement() throws IOException{ if (endOfFile) { return null; } while (true) { String result = readStatementLoop(); if (result != null || endOfFile) { return result; } } } }
ScriptReader { public String readStatement() throws IOException{ if (endOfFile) { return null; } while (true) { String result = readStatementLoop(); if (result != null || endOfFile) { return result; } } } ScriptReader(Reader reader);  ScriptReader(String string); }
ScriptReader { public String readStatement() throws IOException{ if (endOfFile) { return null; } while (true) { String result = readStatementLoop(); if (result != null || endOfFile) { return result; } } } ScriptReader(Reader reader);  ScriptReader(String string); void close(); String readStatement(); boolean isInsideRemark(); boolean isBlockRemark(); void setRewrite(boolean rewrite); }
ScriptReader { public String readStatement() throws IOException{ if (endOfFile) { return null; } while (true) { String result = readStatementLoop(); if (result != null || endOfFile) { return result; } } } ScriptReader(Reader reader);  ScriptReader(String string); void close(); String readStatement(); boolean isInsideRemark(); boolean isBlockRemark(); void setRewrite(boolean rewrite);  }