private void handleTarget(OUpdateExecutionPlan result, OCommandContext ctx, OFromClause target, OWhereClause whereClause, boolean profilingEnabled) { OSelectStatement sourceStatement = new OSelectStatement(-1); sourceStatement.setTarget(target); sourceStatement.setWhereClause(whereClause); OSelectExecutionPlanner planner = new OSelectExecutionPlanner(sourceStatement); result.chain(new SubQueryStep(planner.createExecutionPlan(ctx, profilingEnabled, false), ctx, ctx, profilingEnabled)); }
private void handleTarget(OUpdateExecutionPlan result, OCommandContext ctx, OFromClause target, OWhereClause whereClause, boolean profilingEnabled) { OSelectStatement sourceStatement = new OSelectStatement(-1); sourceStatement.setTarget(target); sourceStatement.setWhereClause(whereClause); OSelectExecutionPlanner planner = new OSelectExecutionPlanner(sourceStatement); result.chain(new SubQueryStep(planner.createExecutionPlan(ctx, profilingEnabled, false), ctx, ctx, profilingEnabled)); } }
private void handleTarget(OUpdateExecutionPlan result, OCommandContext ctx, OFromClause target, OWhereClause whereClause, boolean profilingEnabled) { OSelectStatement sourceStatement = new OSelectStatement(-1); sourceStatement.setTarget(target); sourceStatement.setWhereClause(whereClause); OSelectExecutionPlanner planner = new OSelectExecutionPlanner(sourceStatement); result.chain(new SubQueryStep(planner.createExecutionPlan(ctx, profilingEnabled, false), ctx, ctx, profilingEnabled)); }
private void handleTarget(OUpdateExecutionPlan result, OCommandContext ctx, OFromClause target, OWhereClause whereClause, OTimeout timeout, boolean profilingEnabled) { OSelectStatement sourceStatement = new OSelectStatement(-1); sourceStatement.setTarget(target); sourceStatement.setWhereClause(whereClause); if (timeout != null) { sourceStatement.setTimeout(this.timeout.copy()); } OSelectExecutionPlanner planner = new OSelectExecutionPlanner(sourceStatement); result.chain(new SubQueryStep(planner.createExecutionPlan(ctx, profilingEnabled, false), ctx, ctx, profilingEnabled)); } }
private OSelectStatement createSelectStatement(String targetClass, String targetCluster, ORid targetRid, OWhereClause filter) { OSelectStatement prefetchStm = new OSelectStatement(-1); prefetchStm.setWhereClause(filter); OFromClause from = new OFromClause(-1); OFromItem fromItem = new OFromItem(-1); if (targetRid != null) { fromItem.setRids(Collections.singletonList(targetRid)); } else if (targetClass != null) { fromItem.setIdentifier(new OIdentifier(targetClass)); } else if (targetCluster != null) { fromItem.setCluster(new OCluster(targetCluster)); } from.setItem(fromItem); prefetchStm.setTarget(from); return prefetchStm; }
select.getTarget().getItem().setRids(Collections.singletonList(rid)); select.setWhereClause(where == null ? null : where.copy()); OBasicCommandContext subContxt = new OBasicCommandContext(); subContxt.setParentWithoutOverridingChild(context);