private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (!returnBefore) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleUnsafe(ODeleteExecutionPlan result, OCommandContext ctx, boolean unsafe, boolean profilingEnabled) { if (!unsafe) { result.chain(new CheckSafeDeleteStep(ctx, profilingEnabled)); } }
private void handleUnsafe(ODeleteExecutionPlan result, OCommandContext ctx, boolean unsafe, boolean profilingEnabled) { if (!unsafe) { result.chain(new CheckSafeDeleteStep(ctx, profilingEnabled)); } }
private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean returnBefore, boolean profilingEnabled) { if (!returnBefore) { result.chain(new CountStep(ctx, profilingEnabled)); } }
private void handleWhere(ODeleteExecutionPlan result, OCommandContext ctx, OWhereClause whereClause, boolean profilingEnabled) { if (whereClause != null) { result.chain(new FilterStep(whereClause, ctx, profilingEnabled)); } }
private void handleFetchFromTo(ODeleteExecutionPlan result, OCommandContext ctx, String fromAlias, String toAlias, OIdentifier targetClass, OIdentifier targetCluster, boolean profilingEnabled) { if (fromAlias != null && toAlias != null) { result.chain(new FetchEdgesFromToVerticesStep(fromAlias, toAlias, targetClass, targetCluster, ctx, profilingEnabled)); } else if (toAlias != null) { result.chain(new FetchEdgesToVerticesStep(toAlias, targetClass, targetCluster, ctx, profilingEnabled)); } }
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 handleCastToEdge(ODeleteExecutionPlan plan, OCommandContext ctx, boolean profilingEnabled) { plan.chain(new CastToEdgeStep(ctx, profilingEnabled)); }
private void handleReturn(ODeleteExecutionPlan result, OCommandContext ctx, boolean profilingEnabled) { result.chain(new CountStep(ctx, profilingEnabled)); }
private void handleDelete(ODeleteExecutionPlan result, OCommandContext ctx, boolean profilingEnabled) { result.chain(new DeleteStep(ctx, profilingEnabled)); }
private void handleDelete(ODeleteExecutionPlan result, OCommandContext ctx, boolean profilingEnabled) { result.chain(new DeleteStep(ctx, profilingEnabled)); }
private void handleCastToVertex(ODeleteExecutionPlan plan, OCommandContext ctx, boolean profilingEnabled) { plan.chain(new CastToVertexStep(ctx, profilingEnabled)); }
private void handleDelete(ODeleteExecutionPlan result, OCommandContext ctx, boolean profilingEnabled) { result.chain(new DeleteStep(ctx, profilingEnabled)); }
private void handleTargetRids(ODeleteExecutionPlan result, OCommandContext ctx, List<ORid> rids, boolean profilingEnabled) { if (rids != null) { result.chain( new FetchFromRidsStep(rids.stream().map(x -> x.toRecordId((OResult) null, ctx)).collect(Collectors.toList()), ctx, profilingEnabled)); } }
private void handleTargetClass(ODeleteExecutionPlan result, OCommandContext ctx, OIdentifier className, boolean profilingEnabled) { if (className != null) { result.chain(new FetchFromClassExecutionStep(className.getStringValue(), null, ctx, null, profilingEnabled)); } }
private void handleTargetCluster(ODeleteExecutionPlan result, OCommandContext ctx, OIdentifier targetClusterName, boolean profilingEnabled) { if (targetClusterName != null) { String name = targetClusterName.getStringValue(); int clusterId = ctx.getDatabase().getClusterIdByName(name); if (clusterId < 0) { throw new OCommandExecutionException("Cluster not found: " + name); } result.chain(new FetchFromClusterExecutionStep(clusterId, ctx, profilingEnabled)); } }
result.chain(new DeleteFromIndexStep(index, keyCondition, null, ridCondition, ctx, profilingEnabled)); if (ridCondition != null) { OWhereClause where = new OWhereClause(-1); where.setBaseExpression(ridCondition); result.chain(new FilterStep(where, ctx, profilingEnabled)); throw new OCommandExecutionException("Index " + indexName + " does not allow iteration on values"); result.chain(new FetchFromIndexValuesStep(index, true, ctx, profilingEnabled)); result.chain(new GetValueFromIndexEntryStep(ctx, null, profilingEnabled)); break; case VALUESDESC: throw new OCommandExecutionException("Index " + indexName + " does not allow iteration on values"); result.chain(new FetchFromIndexValuesStep(index, false, ctx, profilingEnabled)); result.chain(new GetValueFromIndexEntryStep(ctx, null, profilingEnabled)); break;