use of org.jkiss.dbeaver.model.exec.DBCExecutionPurpose in project dbeaver by serge-rider.
the class ResultSetJobDataRead method run.
@Override
protected IStatus run(DBRProgressMonitor monitor) {
error = null;
final ProgressLoaderVisualizer<Object> visualizer = new ProgressLoaderVisualizer<>(this, progressControl);
progressMonitor = visualizer.overwriteMonitor(monitor);
DBCExecutionPurpose purpose = DBCExecutionPurpose.USER;
if (dataFilter != null && dataFilter.hasFilters()) {
purpose = DBCExecutionPurpose.USER_FILTERED;
}
new PumpVisualizer(visualizer).schedule(PROGRESS_VISUALIZE_PERIOD * 2);
try (DBCSession session = getExecutionContext().openSession(progressMonitor, purpose, NLS.bind(CoreMessages.controls_rs_pump_job_context_name, dataContainer.toString()))) {
statistics = dataContainer.readData(this, session, controller.getDataReceiver(), dataFilter, offset, maxRows, DBSDataContainer.FLAG_READ_PSEUDO);
} catch (DBException e) {
error = e;
} finally {
visualizer.completeLoading(null);
}
return Status.OK_STATUS;
}
Aggregations