Class OMatchStatement
java.lang.Object
com.orientechnologies.orient.core.sql.parser.SimpleNode
com.orientechnologies.orient.core.sql.parser.OStatement
com.orientechnologies.orient.core.sql.parser.OMatchStatement
- All Implemented Interfaces:
OCommandExecutor,OIterableRecordSource,Node
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclassstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OGroupBystatic final Stringprotected OLimitprotected List<OMatchExpression>protected List<OMatchExpression>protected OOrderByprotected Patternprotected List<OIdentifier>protected booleanprotected List<OExpression>protected List<ONestedProjection>protected OSkipprotected OUnwindFields inherited from class com.orientechnologies.orient.core.sql.parser.OStatement
CUSTOM_STRICT_SQL, originalStatementFields inherited from class com.orientechnologies.orient.core.sql.parser.SimpleNode
children, firstToken, id, lastToken, PARAMETER_PLACEHOLDER, parent, parser, value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddReturnAlias(OIdentifier alias) voidaddReturnItem(OExpression item) voidaddReturnNestedProjection(ONestedProjection projection) protected voidcopy()createExecutionPlan(OCommandContext ctx, boolean enableProfiling) creates an execution plan for current statementbooleanexecute(ODatabaseSession db, Object[] args, OCommandContext parentCtx, boolean usePlanCache) execute(ODatabaseSession db, Map params, OCommandContext parentCtx, boolean usePlanCache) execute(OSQLAsynchQuery<ODocument> request, OCommandContext context, OProgressListener progressListener) executes the match statement.this method works statefully, using request and context variables from current Match statement.longReturns the involved clusters.getLimit()protected ObjectgetResult(OSQLAsynchQuery<ODocument> request) intReturns the security operation type use to check about security.getSkip()inthashCode()booleanbooleanReturns true if the command results can be cached.booleanReturns true if the command doesn't change the database, otherwise false.booleanReturns true if the command must be executed on local node on distributed configuration.booleanmergeResults(Map<String, Object> results) <RET extends OCommandExecutor>
RETparse(OCommandRequest iRequest) this method parses the statementbooleanbooleanbooleanbooleanbooleanvoidsetContext(OCommandContext context) voidsetGroupBy(OGroupBy groupBy) <RET extends OCommandExecutor>
RETsetLimit(int iLimit) voidvoidsetMatchExpressions(List<OMatchExpression> matchExpressions) voidsetNotMatchExpressions(List<OMatchExpression> notMatchExpressions) voidsetOrderBy(OOrderBy orderBy) <RET extends OCommandExecutor>
RETsetProgressListener(OProgressListener progressListener) Set the listener invoked while the command is executing.voidsetReturnAliases(List<OIdentifier> returnAliases) voidsetReturnDistinct(boolean returnDistinct) voidsetReturnItems(List<OExpression> returnItems) voidsetReturnNestedProjections(List<ONestedProjection> returnNestedProjections) voidvoidvoidtoGenericStatement(StringBuilder builder) voidtoString(Map<Object, Object> params, StringBuilder builder) Methods inherited from class com.orientechnologies.orient.core.sql.parser.OStatement
createExecutionPlan, createExecutionPlanNoCache, deserialize, deserializeFromOResult, execute, execute, execute, execute, execute, execute, executinPlanCanBeCached, getOriginalStatement, serialize, setOriginalStatement, toString, validateMethods inherited from class com.orientechnologies.orient.core.sql.parser.SimpleNode
dump, getDatabase, getValue, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toGenericStatement, toString
-
Field Details
-
KEYWORD_MATCH
- See Also:
-
matchExpressions
-
notMatchExpressions
-
returnItems
-
returnAliases
-
returnNestedProjections
-
returnDistinct
protected boolean returnDistinct -
groupBy
-
orderBy
-
unwind
-
skip
-
limit
-
pattern
-
-
Constructor Details
-
OMatchStatement
public OMatchStatement() -
OMatchStatement
public OMatchStatement(int id) -
OMatchStatement
-
-
Method Details
-
getReturnNestedProjections
-
setReturnNestedProjections
-
addMatchExpression
-
addNotMatchExpression
-
addReturnNestedProjection
-
addReturnItem
-
addReturnAlias
-
execute
public OResultSet execute(ODatabaseSession db, Object[] args, OCommandContext parentCtx, boolean usePlanCache) - Overrides:
executein classOStatement
-
execute
public OResultSet execute(ODatabaseSession db, Map params, OCommandContext parentCtx, boolean usePlanCache) - Overrides:
executein classOStatement
-
createExecutionPlan
Description copied from class:OStatementcreates an execution plan for current statement- Overrides:
createExecutionPlanin classOStatement- Parameters:
ctx- the context that will be used to execute the statementenableProfiling- true to enable profiling, false to disable it- Returns:
- an execution plan
-
parse
this method parses the statement- Specified by:
parsein interfaceOCommandExecutor- Type Parameters:
RET-- Parameters:
iRequest- Command request implementation.- Returns:
- See Also:
-
#execute(Map<Object, Object>...)
-
buildPatterns
protected void buildPatterns() -
execute
this method works statefully, using request and context variables from current Match statement. This method will be deprecated in next releases- Specified by:
executein interfaceOCommandExecutor- Parameters:
iArgs- Optional variable arguments to pass to the command.- Returns:
- See Also:
-
execute
public Object execute(OSQLAsynchQuery<ODocument> request, OCommandContext context, OProgressListener progressListener) executes the match statement. This is the preferred execute() method and it has to be used as the default one in the future. This method works in stateless mode- Overrides:
executein classOStatement- Parameters:
request-context-- Returns:
-
getResult
-
returnsPathElements
public boolean returnsPathElements() -
returnsElements
public boolean returnsElements() -
returnsPatterns
public boolean returnsPatterns() -
returnsPaths
public boolean returnsPaths() -
setProgressListener
Description copied from interface:OCommandExecutorSet the listener invoked while the command is executing.- Specified by:
setProgressListenerin interfaceOCommandExecutor- Parameters:
progressListener- OProgressListener implementation- Returns:
-
setLimit
- Specified by:
setLimitin interfaceOCommandExecutor
-
getFetchPlan
- Specified by:
getFetchPlanin interfaceOCommandExecutor
-
getParameters
- Specified by:
getParametersin interfaceOCommandExecutor
-
getContext
- Specified by:
getContextin interfaceOCommandExecutor
-
setContext
- Specified by:
setContextin interfaceOCommandExecutor
-
isIdempotent
public boolean isIdempotent()Description copied from interface:OCommandExecutorReturns true if the command doesn't change the database, otherwise false.- Specified by:
isIdempotentin interfaceOCommandExecutor- Overrides:
isIdempotentin classOStatement
-
getInvolvedClusters
Description copied from interface:OCommandExecutorReturns the involved clusters.- Specified by:
getInvolvedClustersin interfaceOCommandExecutor
-
getSecurityOperationType
public int getSecurityOperationType()Description copied from interface:OCommandExecutorReturns the security operation type use to check about security.- Specified by:
getSecurityOperationTypein interfaceOCommandExecutor- Returns:
- See Also:
-
involveSchema
public boolean involveSchema()- Specified by:
involveSchemain interfaceOCommandExecutor
-
getSyntax
- Specified by:
getSyntaxin interfaceOCommandExecutor
-
isLocalExecution
public boolean isLocalExecution()Description copied from interface:OCommandExecutorReturns true if the command must be executed on local node on distributed configuration.- Specified by:
isLocalExecutionin interfaceOCommandExecutor
-
isCacheable
public boolean isCacheable()Description copied from interface:OCommandExecutorReturns true if the command results can be cached.- Specified by:
isCacheablein interfaceOCommandExecutor
-
getDistributedTimeout
public long getDistributedTimeout()- Specified by:
getDistributedTimeoutin interfaceOCommandExecutor
-
mergeResults
- Specified by:
mergeResultsin interfaceOCommandExecutor- Throws:
Exception
-
toString
- Overrides:
toStringin classOStatement
-
toGenericStatement
- Overrides:
toGenericStatementin classOStatement
-
iterator
- Specified by:
iteratorin interfaceOIterableRecordSource
-
copy
- Overrides:
copyin classOStatement
-
equals
-
hashCode
public int hashCode() -
getLimit
-
setLimit
-
getReturnAliases
-
setReturnAliases
-
getReturnItems
-
setReturnItems
-
getMatchExpressions
-
setMatchExpressions
-
getNotMatchExpressions
-
setNotMatchExpressions
-
isReturnDistinct
public boolean isReturnDistinct() -
setReturnDistinct
public void setReturnDistinct(boolean returnDistinct) -
getOrderBy
-
setOrderBy
-
getGroupBy
-
setGroupBy
-
getUnwind
-
setUnwind
-
getSkip
-
setSkip
-
refersToParent
public boolean refersToParent()- Overrides:
refersToParentin classOStatement
-