@Override public OResultSet execute(ODatabase db, Object[] args, OCommandContext parentCtx) { OBasicCommandContext ctx = new OBasicCommandContext(); if (parentCtx != null) { ctx.setParentWithoutOverridingChild(parentCtx); } ctx.setDatabase(db); Map<Object, Object> params = new HashMap<>(); if (args != null) { for (int i = 0; i < args.length; i++) { params.put(i, args[i]); } } ctx.setInputParameters(params); ODeleteExecutionPlan executionPlan = createExecutionPlan(ctx, false); executionPlan.executeInternal(); return new OLocalResultSet(executionPlan); }
@Override public OResultSet execute(ODatabase db, Object[] args, OCommandContext parentCtx) { OBasicCommandContext ctx = new OBasicCommandContext(); if (parentCtx != null) { ctx.setParentWithoutOverridingChild(parentCtx); } ctx.setDatabase(db); Map<Object, Object> params = new HashMap<>(); if (args != null) { for (int i = 0; i < args.length; i++) { params.put(i, args[i]); } } ctx.setInputParameters(params); ODeleteExecutionPlan executionPlan = createExecutionPlan(ctx, false); executionPlan.executeInternal(); return new OLocalResultSet(executionPlan); }
@Override public OResultSet execute(ODatabase db, Map params, OCommandContext parentCtx) { OBasicCommandContext ctx = new OBasicCommandContext(); if (parentCtx != null) { ctx.setParentWithoutOverridingChild(parentCtx); } ctx.setDatabase(db); ctx.setInputParameters(params); ODeleteExecutionPlan executionPlan = createExecutionPlan(ctx, false); executionPlan.executeInternal(); return new OLocalResultSet(executionPlan); }
@Override public OResultSet execute(ODatabase db, Map params, OCommandContext parentCtx) { OBasicCommandContext ctx = new OBasicCommandContext(); if (parentCtx != null) { ctx.setParentWithoutOverridingChild(parentCtx); } ctx.setDatabase(db); ctx.setInputParameters(params); ODeleteExecutionPlan executionPlan = createExecutionPlan(ctx, false); executionPlan.executeInternal(); return new OLocalResultSet(executionPlan); }
@Override public OResultSet execute(ODatabase db, Map params, OCommandContext parentCtx) { OBasicCommandContext ctx = new OBasicCommandContext(); if (parentCtx != null) { ctx.setParentWithoutOverridingChild(parentCtx); } ctx.setDatabase(db); ctx.setInputParameters(params); ODeleteExecutionPlan executionPlan = createExecutionPlan(ctx, false); executionPlan.executeInternal(); return new OLocalResultSet(executionPlan); }
@Override public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException { if (!executed) { if (plan instanceof OInsertExecutionPlan) { ((OInsertExecutionPlan) plan).executeInternal(); } else if (plan instanceof ODeleteExecutionPlan) { ((ODeleteExecutionPlan) plan).executeInternal(); } else if (plan instanceof OUpdateExecutionPlan) { ((OUpdateExecutionPlan) plan).executeInternal(); } else if (plan instanceof ODDLExecutionPlan) { ((ODDLExecutionPlan) plan).executeInternal((OBasicCommandContext) ctx); } else if (plan instanceof OSingleOpExecutionPlan) { ((OSingleOpExecutionPlan) plan).executeInternal((OBasicCommandContext) ctx); } executed = true; } return plan.fetchNext(nRecords); }