private void handleGlobalLet(ODeleteExecutionPlan result, OIdentifier name, OExpression expression, OCommandContext ctx, boolean profilingEnabled) { if (expression != null) { result.chain(new GlobalLetExpressionStep(name, expression, ctx, profilingEnabled)); } } }
private void handleGlobalLet(OInsertExecutionPlan result, OIdentifier name, OExpression expression, OCommandContext ctx, boolean profilingEnabled) { result.chain(new GlobalLetExpressionStep(name, expression, ctx, profilingEnabled)); }
@Override public OExecutionStep copy(OCommandContext ctx) { return new GlobalLetExpressionStep(varname.copy(), expression.copy(), ctx, profilingEnabled); }
public OUpdateExecutionPlan createExecutionPlan(OCommandContext ctx, boolean enableProfiling) { OForEachExecutionPlan plan = new OForEachExecutionPlan(ctx); int nextProg = ++FOREACH_VARIABLE_PROGR; if (FOREACH_VARIABLE_PROGR < 0) { FOREACH_VARIABLE_PROGR = 0; } OIdentifier varName = new OIdentifier("$__ORIENTDB_FOREACH_VAR_" + nextProg); plan.chain(new GlobalLetExpressionStep(varName, loopValues, ctx, enableProfiling)); plan.chain(new ForEachStep(loopVariable, new OExpression(varName), statements, ctx, enableProfiling)); return plan; }
private void handleGlobalLet(OSelectExecutionPlan result, QueryPlanningInfo info, OCommandContext ctx, boolean profilingEnabled) { if (info.globalLetClause != null) { List<OLetItem> items = info.globalLetClause.getItems(); for (OLetItem item : items) { if (item.getExpression() != null) { result.chain(new GlobalLetExpressionStep(item.getVarName(), item.getExpression(), ctx, profilingEnabled)); } else { result.chain(new GlobalLetQueryStep(item.getVarName(), item.getQuery(), ctx, profilingEnabled)); } info.globalLetPresent = true; } } }