iterable = new RuntimeExceptionWrappingIterable(entities, isJPA);
}
final StreamingQueryResult qr = new StreamingQueryResult(query, iterable, resultTransformer, endCursor);
// Add a listener to the connection so we can get a callback when the connection is
// flushed.
ManagedConnectionResourceListener listener = new ManagedConnectionResourceListener() {
public void managedConnectionPreClose() {}
public void managedConnectionPostClose() {}
public void managedConnectionFlushed() {
qr.setHasError(iterable.hasError());
// Disconnect the query from this ManagedConnection (read in unread rows etc)