private void handleBatch(OUpdateExecutionPlan result, OCommandContext ctx, OBatch batch, boolean profilingEnabled) { if (batch != null) { result.chain(new BatchStep(batch, ctx, profilingEnabled)); } }
private void handleResultForReturnBefore(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnBefore, OProjection returnProjection, boolean profilingEnabled) { if (returnBefore) { result.chain(new UnwrapPreviousValueStep(ctx, profilingEnabled)); if (returnProjection != null) { result.chain(new ProjectionCalculationStep(returnProjection, ctx, profilingEnabled)); } } }
private void handleLimit(OUpdateExecutionPlan plan, OCommandContext ctx, OLimit limit, boolean profilingEnabled) { if (limit != null) { plan.chain(new LimitExecutionStep(limit, ctx, profilingEnabled)); } }
private void handleResultForReturnAfter(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnAfter, OProjection returnProjection, boolean profilingEnabled) { if (returnAfter) { //re-convert to normal step result.chain(new ConvertToResultInternalStep(ctx, profilingEnabled)); if (returnProjection != null) { result.chain(new ProjectionCalculationStep(returnProjection, ctx, profilingEnabled)); } } }
private void handleResultForReturnCount(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnCount, boolean profilingEnabled) { if (returnCount) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleReturnBefore(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (returnBefore) { result.chain(new CopyRecordContentBeforeUpdateStep(ctx, profilingEnabled)); } }
private void handleUpsert(OUpdateExecutionPlan plan, OCommandContext ctx, OFromClause target, OWhereClause where, boolean upsert, boolean profilingEnabled) { if (upsert) { plan.chain(new UpsertStep(target, where, ctx, profilingEnabled)); } }
private void handleLimit(OUpdateExecutionPlan plan, OCommandContext ctx, OLimit limit, boolean profilingEnabled) { if (limit != null) { plan.chain(new LimitExecutionStep(limit, ctx, profilingEnabled)); } }
/** * add a step that transforms a normal OResult in a specific object that under setProperty() updates the actual OIdentifiable * * @param plan the execution plan * @param ctx the executino context */ private void convertToModifiableResult(OUpdateExecutionPlan plan, OCommandContext ctx, boolean profilingEnabled) { plan.chain(new ConvertToUpdatableResultStep(ctx, profilingEnabled)); }
private void handleResultForReturnCount(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnCount, boolean profilingEnabled) { if (returnCount) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleResultForReturnAfter(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnAfter, OProjection returnProjection, boolean profilingEnabled) { if (returnAfter) { //re-convert to normal step result.chain(new ConvertToResultInternalStep(ctx, profilingEnabled)); if (returnProjection != null) { result.chain(new ProjectionCalculationStep(returnProjection, ctx, profilingEnabled)); } } }
/** * add a step that transforms a normal OResult in a specific object that under setProperty() updates the actual OIdentifiable * * @param plan the execution plan * @param ctx the executino context */ private void convertToModifiableResult(OUpdateExecutionPlan plan, OCommandContext ctx, boolean profilingEnabled) { plan.chain(new ConvertToUpdatableResultStep(ctx, profilingEnabled)); }
private void handleResultForReturnBefore(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnBefore, OProjection returnProjection, boolean profilingEnabled) { if (returnBefore) { result.chain(new UnwrapPreviousValueStep(ctx, profilingEnabled)); if (returnProjection != null) { result.chain(new ProjectionCalculationStep(returnProjection, ctx, profilingEnabled)); } } }
private void handleReturnBefore(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (returnBefore) { result.chain(new CopyRecordContentBeforeUpdateStep(ctx, profilingEnabled)); } }
private void handleUpsert(OUpdateExecutionPlan plan, OCommandContext ctx, OFromClause target, OWhereClause where, boolean upsert, boolean profilingEnabled) { if (upsert) { plan.chain(new UpsertStep(target, where, ctx, profilingEnabled)); } }
private void handleLimit(OUpdateExecutionPlan plan, OCommandContext ctx, OLimit limit, boolean profilingEnabled) { if (limit != null) { plan.chain(new LimitExecutionStep(limit, ctx, profilingEnabled)); } }
private void handleTimeout(OUpdateExecutionPlan result, OCommandContext ctx, OTimeout timeout, boolean profilingEnabled) { if (timeout != null && timeout.getVal().longValue() > 0) { result.chain(new TimeoutStep(timeout, ctx, profilingEnabled)); } }
private void handleTimeout(OUpdateExecutionPlan result, OCommandContext ctx, OTimeout timeout, boolean profilingEnabled) { if (timeout != null && timeout.getVal().longValue() > 0) { result.chain(new TimeoutStep(timeout, 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)); } }