void close() { wrapExceptionAndCall(() -> statement.close()); }
void close() { wrapExceptionAndCall(() -> statement.close()); }
private <T> T runSql(SqlAction<T> action) { long start = System.currentTimeMillis(); T result = wrapExceptionAndCall(action); executionCount++; executionTotalMillis += System.currentTimeMillis() - start; return result; }
private void runVoidSql(SqlVoidAction action) { long start = System.currentTimeMillis(); wrapExceptionAndCall(action); executionCount++; executionTotalMillis += System.currentTimeMillis() - start; }
private <T> T runSql(SqlAction<T> action) { long start = System.currentTimeMillis(); T result = wrapExceptionAndCall(action); executionCount++; executionTotalMillis += System.currentTimeMillis() - start; return result; }
private void runVoidSql(SqlVoidAction action) { long start = System.currentTimeMillis(); wrapExceptionAndCall(action); executionCount++; executionTotalMillis += System.currentTimeMillis() - start; }
PreparedStatementExecutor(ConnectionProvider connectionProvider, Query query) { this.rawSql = query.rawSQl(); this.queryName = query.name(); this.statement = wrapExceptionAndCall(() -> connectionProvider.getConnection().prepareStatement(this.rawSql)); }
PreparedStatementExecutor(ConnectionProvider connectionProvider, Query query) { this.rawSql = query.rawSQl(); this.queryName = query.name(); this.statement = wrapExceptionAndCall(() -> connectionProvider.getConnection().prepareStatement(this.rawSql)); }