public int addBatch(EqlRun eqlRun) throws SQLException { PreparedStatement ps = batchedMap.get(eqlRun.getRunSql()); if (ps == null) { ps = EqlUtils.prepareSQL(sqlClassPath, eqlConfig, eqlRun, sqlId, tagSqlId); batchedMap.put(eqlRun.getRunSql(), ps); batchedPs.add(ps); } eqlRun.bindParams(ps, sqlClassPath); ps.addBatch(); ++currentBatches; return maxBatches > 0 && currentBatches >= maxBatches ? executeBatch(false) : 0; }