Package com.arcadedb.query.sql.executor
Class ScriptExecutionPlan
- java.lang.Object
-
- com.arcadedb.query.sql.executor.ScriptExecutionPlan
-
- All Implemented Interfaces:
ExecutionPlan
,InternalExecutionPlan
,Serializable
public class ScriptExecutionPlan extends Object implements InternalExecutionPlan
- Author:
- Luigi Dell'Aquila (luigi.dellaquila-(at)-gmail.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ScriptLineStep>
steps
-
Fields inherited from interface com.arcadedb.query.sql.executor.InternalExecutionPlan
JAVA_TYPE
-
-
Constructor Summary
Constructors Constructor Description ScriptExecutionPlan(CommandContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeCached()
void
chain(InternalExecutionPlan nextPlan, boolean profilingEnabled)
void
close()
boolean
containsReturn()
ExecutionStepInternal
executeFull()
executes the whole script and returns last statement ONLY if it's a RETURN, otherwise it returns null;ExecutionStepInternal
executeUntilReturn()
executes all the script and returns last statement execution step, so that it can be executed from outsideResultSet
fetchNext(int n)
if the execution can still return N elements, then the result will contain them all.long
getCost()
String
getStatement()
List<ExecutionStep>
getSteps()
String
prettyPrint(int depth, int indent)
void
reset(CommandContext ctx)
void
setStatement(String statement)
void
setSteps(List<ExecutionStepInternal> steps)
Result
toResult()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.arcadedb.query.sql.executor.InternalExecutionPlan
copy, deserialize, serialize
-
-
-
-
Field Detail
-
steps
protected List<ScriptLineStep> steps
-
-
Constructor Detail
-
ScriptExecutionPlan
public ScriptExecutionPlan(CommandContext ctx)
-
-
Method Detail
-
reset
public void reset(CommandContext ctx)
- Specified by:
reset
in interfaceInternalExecutionPlan
-
close
public void close()
- Specified by:
close
in interfaceInternalExecutionPlan
-
fetchNext
public ResultSet fetchNext(int n)
Description copied from interface:InternalExecutionPlan
if the execution can still return N elements, then the result will contain them all. If the execution contains less than N elements, then the result will contain them all, next result(s) will contain zero elements- Specified by:
fetchNext
in interfaceInternalExecutionPlan
- Returns:
-
prettyPrint
public String prettyPrint(int depth, int indent)
- Specified by:
prettyPrint
in interfaceExecutionPlan
-
chain
public void chain(InternalExecutionPlan nextPlan, boolean profilingEnabled)
-
getSteps
public List<ExecutionStep> getSteps()
- Specified by:
getSteps
in interfaceExecutionPlan
-
setSteps
public void setSteps(List<ExecutionStepInternal> steps)
-
toResult
public Result toResult()
- Specified by:
toResult
in interfaceExecutionPlan
-
getCost
public long getCost()
- Specified by:
getCost
in interfaceInternalExecutionPlan
-
canBeCached
public boolean canBeCached()
- Specified by:
canBeCached
in interfaceInternalExecutionPlan
-
containsReturn
public boolean containsReturn()
-
executeUntilReturn
public ExecutionStepInternal executeUntilReturn()
executes all the script and returns last statement execution step, so that it can be executed from outside- Returns:
-
executeFull
public ExecutionStepInternal executeFull()
executes the whole script and returns last statement ONLY if it's a RETURN, otherwise it returns null;- Returns:
-
getStatement
public String getStatement()
- Specified by:
getStatement
in interfaceInternalExecutionPlan
-
setStatement
public void setStatement(String statement)
- Specified by:
setStatement
in interfaceInternalExecutionPlan
-
-