use of org.davidmoten.rx.jdbc.callable.internal.OutParameterPlaceholder in project rxjava2-jdbc by davidmoten.
the class Call method execute.
private static List<PlaceAndType> execute(NamedCallableStatement stmt, List<Object> parameters, List<ParameterPlaceholder> parameterPlaceholders, int outCount, CallableStatement st) throws SQLException {
Util.incrementCounter(st.getConnection());
setParameters(st, parameters, parameterPlaceholders, stmt.names);
int initialSize = outCount == Integer.MAX_VALUE ? 16 : outCount;
List<PlaceAndType> outs = new ArrayList<PlaceAndType>(initialSize);
for (int j = 0; j < parameterPlaceholders.size(); j++) {
ParameterPlaceholder p = parameterPlaceholders.get(j);
if (p instanceof OutParameterPlaceholder) {
outs.add(new PlaceAndType(j + 1, ((OutParameterPlaceholder) p).type()));
if (outs.size() == outCount) {
break;
}
}
}
st.execute();
return outs;
}
Aggregations