use of com.wplatform.ddal.util.BitField in project jdbc-shards by wplatform.
the class Optimizer method calculateGenetic.
private void calculateGenetic() {
TableFilter[] best = new TableFilter[filters.length];
TableFilter[] list = new TableFilter[filters.length];
for (int x = 0; x < MAX_GENETIC; x++) {
if (canStop(x)) {
break;
}
boolean generateRandom = (x & 127) == 0;
if (!generateRandom) {
System.arraycopy(best, 0, list, 0, filters.length);
if (!shuffleTwo(list)) {
generateRandom = true;
}
}
if (generateRandom) {
switched = new BitField();
System.arraycopy(filters, 0, best, 0, filters.length);
shuffleAll(best);
System.arraycopy(best, 0, list, 0, filters.length);
}
if (testPlan(list)) {
switched = new BitField();
System.arraycopy(list, 0, best, 0, filters.length);
}
}
}
use of com.wplatform.ddal.util.BitField in project jdbc-shards by wplatform.
the class JdbcCallableStatement method registerOutParameter.
private void registerOutParameter(int parameterIndex) throws SQLException {
try {
checkClosed();
if (outParameters == null) {
maxOutParameters = Math.min(getParameterMetaData().getParameterCount(), getCheckedMetaData().getColumnCount());
outParameters = new BitField();
}
checkIndexBounds(parameterIndex);
ParameterInterface param = command.getParameters().get(--parameterIndex);
if (!param.isValueSet()) {
param.setValue(ValueNull.INSTANCE, false);
}
outParameters.set(parameterIndex);
} catch (Exception e) {
throw logAndConvert(e);
}
}
Aggregations