use of org.adbcj.Value in project adbcj by mheath.
the class DefaultRow method entrySet.
@Override
public Set<java.util.Map.Entry<Object, Value>> entrySet() {
if (entrySet == null) {
Set<java.util.Map.Entry<Object, Value>> set = new HashSet<Entry<Object, Value>>();
for (Value value : values) {
set.add(new AbstractMap.SimpleEntry<Object, Value>(value.getField(), value));
}
entrySet = Collections.unmodifiableSet(set);
}
return entrySet;
}
use of org.adbcj.Value in project adbcj by mheath.
the class DefaultRow method get.
@Override
public Value get(Object key) {
Field field = resultSet.getField(key);
Value value = values[field.getIndex()];
return value;
}
use of org.adbcj.Value in project adbcj by mheath.
the class ProtocolHandler method handleResultSetRowResponse.
private void handleResultSetRowResponse(AbstractMySqlConnection connection, ResultSetRowResponse message) {
Request<ResultSet> activeRequest = connection.getActiveRequest();
ResultSetRowResponse rowResponse = (ResultSetRowResponse) message;
activeRequest.getEventHandler().startRow(activeRequest.getAccumulator());
for (Value value : rowResponse.getValues()) {
activeRequest.getEventHandler().value(value, activeRequest.getAccumulator());
}
activeRequest.getEventHandler().endRow(activeRequest.getAccumulator());
}
Aggregations