/** * Execute this script as a set of separate statements */ public void executeAsSeparateStatements() { for (String s : getStatements()) { handle.execute(s); } }
/** * Execute this script in a batch statement * * @return an array of ints which are the results of each statement in the script */ public int[] execute() { final List<String> statements = getStatements(); Batch b = handle.createBatch(); statements.forEach(b::add); return b.execute(); }
/** * Execute this script as a set of separate statements */ public void executeAsSeparateStatements() { for (String s : getStatements()) { handle.execute(s); } }
/** * Execute this script in a batch statement * * @return an array of ints which are the results of each statement in the script */ public int[] execute() { final List<String> statements = getStatements(); Batch b = handle.createBatch(); statements.forEach(b::add); return b.execute(); }