use of com.bakdata.conquery.models.query.queryplan.QueryPlan in project conquery by bakdata.
the class QueryJob method get.
@Override
public Optional<EntityResult> get() {
if (ctx.isQueryCancelled()) {
return Optional.empty();
}
try {
QueryPlan queryPlan = plan.get();
queryPlan.init(ctx, entity);
return queryPlan.execute(ctx, entity);
} catch (ConqueryError e) {
// Catch errors, propagate them with their id.
throw new ConqueryError.ExecutionJobErrorWrapper(entity, e);
} catch (Exception e) {
throw new ConqueryError.ExecutionJobErrorWrapper(entity, new ConqueryError.UnknownError(e));
}
}
Aggregations