@Test public void should_execute_statements_with_custom_delimiter() throws Exception { scriptingConfiguration.setSqlStatementDelimiter("GO"); scriptExecutor = spy(new ScriptExecutor(connection, scriptingConfiguration, new DefaultStatementSplitter("GO"))); scriptExecutor.execute(FileLoader.loadAsString("scripts/t-sql-example.sql")); verify(connection, times(4)).createStatement(); }
public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); void execute(String script); }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); void execute(String script);  }