private void endRemark() { clearRemark(); insideRemark = false; }
private int read() throws IOException { if (bufferPos >= bufferEnd) { return readBuffer(); } return buffer[bufferPos++]; }
promptLoop(); } else { ScriptReader r = new ScriptReader(new StringReader(sql)); while (true) { String s = r.readStatement(); if (s == null) { break;
private String readStatementLoop() throws IOException { bufferStart = bufferPos; int c = read(); while (true) { if (c < 0) { c = read(); if (c == '$' && (bufferPos - bufferStart < 3 || buffer[bufferPos - 3] <= ' ')) { c = read(); if (c < 0) { break; c = read(); if (c < 0) { break; c = read(); c = read(); if (c < 0) { break; c = read(); break; case '"': while (true) { c = read(); if (c < 0) { break;
/** * Read a statement from the reader. This method returns null if the end has * been reached. * * @return the SQL statement or null */ public String readStatement() { if (endOfFile) { return null; } try { return readStatementLoop(); } catch (IOException e) { throw DbException.convertIOException(e, null); } }
reader.reset(); ScriptReader r = new ScriptReader(reader); while (true) { String sql = r.readStatement(); if (sql == null) { break;