this(sql, ImmutableSet.of(";"));
}
public StatementSplitter(String sql, Set<String> delimiters)
{
TokenSource tokens = getLexer(sql, delimiters);
ImmutableList.Builder<Statement> list = ImmutableList.builder();
StringBuilder sb = new StringBuilder();
while (true) {
Token token = tokens.nextToken();
if (token.getType() == Token.EOF) {
break;
}
if (token.getType() == StatementLexer.TERMINATOR) {
String statement = sb.toString().trim();