public class OMatchStatement extends OStatement implements OCommandExecutor, OIterableRecordSource
Modifier and Type | Class and Description |
---|---|
static class |
OMatchStatement.EdgeTraversal |
class |
OMatchStatement.MatchContext |
static class |
OMatchStatement.MatchExecutionPlan |
Modifier and Type | Field and Description |
---|---|
protected OGroupBy |
groupBy |
static String |
KEYWORD_MATCH |
protected OLimit |
limit |
protected List<OMatchExpression> |
matchExpressions |
protected List<OMatchExpression> |
notMatchExpressions |
protected OOrderBy |
orderBy |
protected Pattern |
pattern |
protected List<OIdentifier> |
returnAliases |
protected boolean |
returnDistinct |
protected List<OExpression> |
returnItems |
protected List<ONestedProjection> |
returnNestedProjections |
protected OSkip |
skip |
protected OUnwind |
unwind |
CUSTOM_STRICT_SQL, originalStatement
children, firstToken, id, lastToken, parent, parser, value
Constructor and Description |
---|
OMatchStatement() |
OMatchStatement(int id) |
OMatchStatement(OrientSql p,
int id) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildPatterns() |
OMatchStatement |
copy() |
OInternalExecutionPlan |
createExecutionPlan(OCommandContext ctx,
boolean enableProfiling)
creates an execution plan for current statement
|
boolean |
equals(Object o) |
Object |
execute(Map<Object,Object> iArgs)
this method works statefully, using request and context variables from current Match statement.
|
OResultSet |
execute(ODatabase db,
Map params,
OCommandContext parentCtx,
boolean usePlanCache) |
OResultSet |
execute(ODatabase db,
Object[] args,
OCommandContext parentCtx,
boolean usePlanCache) |
Object |
execute(OSQLAsynchQuery<ODocument> request,
OCommandContext context,
OProgressListener progressListener)
executes the match statement.
|
OCommandContext |
getContext() |
long |
getDistributedTimeout() |
String |
getFetchPlan() |
OGroupBy |
getGroupBy() |
Set<String> |
getInvolvedClusters()
Returns the involved clusters.
|
OLimit |
getLimit() |
List<OMatchExpression> |
getMatchExpressions() |
List<OMatchExpression> |
getNotMatchExpressions() |
OOrderBy |
getOrderBy() |
Map<Object,Object> |
getParameters() |
protected Object |
getResult(OSQLAsynchQuery<ODocument> request) |
List<OIdentifier> |
getReturnAliases() |
List<OExpression> |
getReturnItems() |
List<ONestedProjection> |
getReturnNestedProjections() |
int |
getSecurityOperationType()
Returns the security operation type use to check about security.
|
OSkip |
getSkip() |
String |
getSyntax() |
OUnwind |
getUnwind() |
int |
hashCode() |
boolean |
involveSchema() |
boolean |
isCacheable()
Returns true if the command results can be cached.
|
boolean |
isIdempotent()
Returns true if the command doesn't change the database, otherwise false.
|
boolean |
isLocalExecution()
Returns true if the command must be executed on local node on distributed configuration.
|
boolean |
isReturnDistinct() |
Iterator<OIdentifiable> |
iterator(Map<Object,Object> iArgs) |
Object |
mergeResults(Map<String,Object> results) |
<RET extends OCommandExecutor> |
parse(OCommandRequest iRequest)
this method parses the statement
|
boolean |
refersToParent() |
boolean |
returnsElements() |
boolean |
returnsPathElements() |
boolean |
returnsPaths() |
boolean |
returnsPatterns() |
void |
setContext(OCommandContext context) |
void |
setGroupBy(OGroupBy groupBy) |
<RET extends OCommandExecutor> |
setLimit(int iLimit) |
void |
setLimit(OLimit limit) |
void |
setMatchExpressions(List<OMatchExpression> matchExpressions) |
void |
setNotMatchExpressions(List<OMatchExpression> notMatchExpressions) |
void |
setOrderBy(OOrderBy orderBy) |
<RET extends OCommandExecutor> |
setProgressListener(OProgressListener progressListener)
Set the listener invoked while the command is executing.
|
void |
setReturnAliases(List<OIdentifier> returnAliases) |
void |
setReturnDistinct(boolean returnDistinct) |
void |
setReturnItems(List<OExpression> returnItems) |
void |
setReturnNestedProjections(List<ONestedProjection> returnNestedProjections) |
void |
setSkip(OSkip skip) |
void |
setUnwind(OUnwind unwind) |
void |
toString(Map<Object,Object> params,
StringBuilder builder) |
createExecutionPlan, createExecutionPlanNoCache, deserialize, deserializeFromOResult, execute, execute, execute, execute, execute, execute, executinPlanCanBeCached, getOriginalStatement, serialize, setOriginalStatement, toString, validate
childrenAccept, dump, getDatabase, getValue, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toString
public static final String KEYWORD_MATCH
protected List<OMatchExpression> matchExpressions
protected List<OMatchExpression> notMatchExpressions
protected List<OExpression> returnItems
protected List<OIdentifier> returnAliases
protected List<ONestedProjection> returnNestedProjections
protected boolean returnDistinct
protected OGroupBy groupBy
protected OOrderBy orderBy
protected OUnwind unwind
protected OSkip skip
protected OLimit limit
protected Pattern pattern
public OMatchStatement()
public OMatchStatement(int id)
public OMatchStatement(OrientSql p, int id)
public List<ONestedProjection> getReturnNestedProjections()
public void setReturnNestedProjections(List<ONestedProjection> returnNestedProjections)
public OResultSet execute(ODatabase db, Object[] args, OCommandContext parentCtx, boolean usePlanCache)
execute
in class OStatement
public OResultSet execute(ODatabase db, Map params, OCommandContext parentCtx, boolean usePlanCache)
execute
in class OStatement
public OInternalExecutionPlan createExecutionPlan(OCommandContext ctx, boolean enableProfiling)
OStatement
createExecutionPlan
in class OStatement
ctx
- the context that will be used to execute the statementenableProfiling
- true to enable profiling, false to disable itpublic <RET extends OCommandExecutor> RET parse(OCommandRequest iRequest)
parse
in interface OCommandExecutor
RET
- iRequest
- Command request implementation.#execute(Map
protected void buildPatterns()
public Object execute(Map<Object,Object> iArgs)
execute
in interface OCommandExecutor
iArgs
- Optional variable arguments to pass to the command.OCommandExecutor.parse(OCommandRequest)
public Object execute(OSQLAsynchQuery<ODocument> request, OCommandContext context, OProgressListener progressListener)
execute
in class OStatement
request
- context
- protected Object getResult(OSQLAsynchQuery<ODocument> request)
public boolean returnsPathElements()
public boolean returnsElements()
public boolean returnsPatterns()
public boolean returnsPaths()
public <RET extends OCommandExecutor> RET setProgressListener(OProgressListener progressListener)
OCommandExecutor
setProgressListener
in interface OCommandExecutor
progressListener
- OProgressListener implementationpublic <RET extends OCommandExecutor> RET setLimit(int iLimit)
setLimit
in interface OCommandExecutor
public String getFetchPlan()
getFetchPlan
in interface OCommandExecutor
public Map<Object,Object> getParameters()
getParameters
in interface OCommandExecutor
public OCommandContext getContext()
getContext
in interface OCommandExecutor
public void setContext(OCommandContext context)
setContext
in interface OCommandExecutor
public boolean isIdempotent()
OCommandExecutor
isIdempotent
in interface OCommandExecutor
isIdempotent
in class OStatement
public Set<String> getInvolvedClusters()
OCommandExecutor
getInvolvedClusters
in interface OCommandExecutor
public int getSecurityOperationType()
OCommandExecutor
getSecurityOperationType
in interface OCommandExecutor
PERMISSION_*
public boolean involveSchema()
involveSchema
in interface OCommandExecutor
public String getSyntax()
getSyntax
in interface OCommandExecutor
public boolean isLocalExecution()
OCommandExecutor
isLocalExecution
in interface OCommandExecutor
public boolean isCacheable()
OCommandExecutor
isCacheable
in interface OCommandExecutor
public long getDistributedTimeout()
getDistributedTimeout
in interface OCommandExecutor
public Object mergeResults(Map<String,Object> results) throws Exception
mergeResults
in interface OCommandExecutor
Exception
public void toString(Map<Object,Object> params, StringBuilder builder)
toString
in class OStatement
public Iterator<OIdentifiable> iterator(Map<Object,Object> iArgs)
iterator
in interface OIterableRecordSource
public OMatchStatement copy()
copy
in class OStatement
public OLimit getLimit()
public void setLimit(OLimit limit)
public List<OIdentifier> getReturnAliases()
public void setReturnAliases(List<OIdentifier> returnAliases)
public List<OExpression> getReturnItems()
public void setReturnItems(List<OExpression> returnItems)
public List<OMatchExpression> getMatchExpressions()
public void setMatchExpressions(List<OMatchExpression> matchExpressions)
public List<OMatchExpression> getNotMatchExpressions()
public void setNotMatchExpressions(List<OMatchExpression> notMatchExpressions)
public boolean isReturnDistinct()
public void setReturnDistinct(boolean returnDistinct)
public OOrderBy getOrderBy()
public void setOrderBy(OOrderBy orderBy)
public OGroupBy getGroupBy()
public void setGroupBy(OGroupBy groupBy)
public OUnwind getUnwind()
public void setUnwind(OUnwind unwind)
public OSkip getSkip()
public void setSkip(OSkip skip)
public boolean refersToParent()
refersToParent
in class OStatement
Copyright © 2009–2020 OrientDB. All rights reserved.