private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (!returnBefore) { result.chain(new CountStep(ctx, profilingEnabled)); } }
@Override public String prettyPrint(int depth, int indent) { String spaces = OExecutionStepInternal.getIndent(depth, indent); StringBuilder result = new StringBuilder(); result.append(spaces); result.append("+ COUNT"); if (profilingEnabled) { result.append(" (" + getCostFormatted() + ")"); } return result.toString(); }
@Override public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException { if (executed) { return new OInternalResultSet(); } OResultInternal resultRecord = new OResultInternal(); executed = true; long count = 0; while (true) { OResultSet prevResult = getPrev().get().syncPull(ctx, nRecords); if (!prevResult.hasNext()) { long begin = profilingEnabled ? System.nanoTime() : 0; try { OInternalResultSet result = new OInternalResultSet(); resultRecord.setProperty("count", count); result.add(resultRecord); return result; } finally { if (profilingEnabled) { cost += (System.nanoTime() - begin); } } } while (prevResult.hasNext()) { count++; prevResult.next(); } } }
private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (!returnBefore) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleResultForReturnCount(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnCount, boolean profilingEnabled) { if (returnCount) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleResultForReturnCount(OUpdateExecutionPlan result, OCommandContext ctx, boolean returnCount, boolean profilingEnabled) { if (returnCount) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean profilingEnabled) { result.chain(new CountStep(ctx, profilingEnabled)); }