Package com.arcadedb.query.sql.executor
Class CheckClassTypeStep
- java.lang.Object
-
- com.arcadedb.query.sql.executor.AbstractExecutionStep
-
- com.arcadedb.query.sql.executor.CheckClassTypeStep
-
- All Implemented Interfaces:
ExecutionStep
,ExecutionStepInternal
public class CheckClassTypeStep extends AbstractExecutionStep
This step is used just as a gate check for classes (eg. for CREATE VERTEX to make sure that the passed class is a vertex class).
It accepts two values: a target class and a parent class. If the two classes are the same or if the parent class is indeed a parent class of the target class, then the syncPool() returns an empty result set, otherwise it throws an PCommandExecutionException
- Author:
- Luigi Dell'Aquila (luigi.dellaquila-(at)-gmail.com)
-
-
Field Summary
-
Fields inherited from class com.arcadedb.query.sql.executor.AbstractExecutionStep
ctx, next, prev, profilingEnabled, timedOut
-
-
Constructor Summary
Constructors Constructor Description CheckClassTypeStep(String targetClass, String parentClass, CommandContext ctx, boolean profilingEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCost()
returns the absolute cost (in nanoseconds) of the execution of this stepString
prettyPrint(int depth, int indent)
ResultSet
syncPull(CommandContext ctx, int nRecords)
-
Methods inherited from class com.arcadedb.query.sql.executor.AbstractExecutionStep
close, getContext, getCostFormatted, getNext, getPrev, isProfilingEnabled, isTimedOut, sendTimeout, setNext, setPrevious, setProfilingEnabled
-
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.ExecutionStep
toResult
-
Methods inherited from interface com.arcadedb.query.sql.executor.ExecutionStepInternal
canBeCached, copy, deserialize, getDescription, getName, getSubExecutionPlans, getSubSteps, getTargetNode, getType, reset, serialize
-
-
-
-
Constructor Detail
-
CheckClassTypeStep
public CheckClassTypeStep(String targetClass, String parentClass, CommandContext ctx, boolean profilingEnabled)
- Parameters:
targetClass
- a class to be checkedparentClass
- a class that is supposed to be the same or a parent class of the target classctx
- execuiton contextprofilingEnabled
- true to collect execution stats
-
-
Method Detail
-
syncPull
public ResultSet syncPull(CommandContext ctx, int nRecords) throws TimeoutException
- Throws:
TimeoutException
-
prettyPrint
public String prettyPrint(int depth, int indent)
-
getCost
public long getCost()
Description copied from interface:ExecutionStep
returns the absolute cost (in nanoseconds) of the execution of this step- Returns:
- the absolute cost (in nanoseconds) of the execution of this step, -1 if not calculated
-
-