
public class OCommandExecutorSQLSelect extends OCommandExecutorSQLResultsetAbstract implements OTemporaryRidGenerator
OCommandDistributedReplicateRequest.DISTRIBUTED_EXECUTION_MODE, OCommandDistributedReplicateRequest.DISTRIBUTED_RESULT_MGMT, OCommandDistributedReplicateRequest.QUORUM_TYPE| Modifier and Type | Field and Description |
|---|---|
static String |
KEYWORD_ASC |
static String |
KEYWORD_BY |
static String |
KEYWORD_DESC |
static String |
KEYWORD_FETCHPLAN |
static String |
KEYWORD_GROUP |
static String |
KEYWORD_NOCACHE |
static String |
KEYWORD_ORDER |
static String |
KEYWORD_SELECT |
static String |
KEYWORD_UNWIND |
compiledFilter, KEYWORD_FROM_2FIND, KEYWORD_LET_2FIND, lazyIteration, let, parsedTarget, request, resultCount, serialTempRID, skip, target, tempResultCLASS_PREFIX, CLUSTER_PREFIX, DEFAULT_PARAM_USER, DICTIONARY_PREFIX, INDEX_PREFIX, INDEX_VALUES_ASC_PREFIX, INDEX_VALUES_DESC_PREFIX, INDEX_VALUES_PREFIX, KEYWORD_FROM, KEYWORD_KEY, KEYWORD_LET, KEYWORD_LIMIT, KEYWORD_LOCK, KEYWORD_OFFSET, KEYWORD_RETURN, KEYWORD_RID, KEYWORD_SKIP, KEYWORD_TIMEOUT, KEYWORD_UNSAFE, KEYWORD_WHERE, METADATA_INDEXMGR, METADATA_PREFIX, METADATA_SCHEMA, preParsedStatement, timeoutMs, timeoutStrategycontext, limit, parameters, progressListenerparserText, parserTextUpperCase| Constructor and Description |
|---|
OCommandExecutorSQLSelect() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addResult(OIdentifiable iRecord,
OCommandContext iContext) |
protected boolean |
assignTarget(Map<Object,Object> iArgs)
Assign the right TARGET if found.
|
protected void |
checkForSystemClusters(ODatabaseDocumentInternal iDatabase,
ORID rid) |
protected Map<String,Object> |
createProjectionFromDefinition() |
Object |
execute(Map<Object,Object> iArgs)
Execute the requested command parsed previously.
|
protected void |
executeSearch(Map<Object,Object> iArgs) |
protected boolean |
executeSearchRecord(OIdentifiable id,
OCommandContext iContext,
boolean callHooks) |
protected int |
extractProjectionNameSubstringEndPosition(String projection) |
String |
getFetchPlan() |
Set<String> |
getInvolvedClusters()
Determine clusters that are used in select operation
|
Map<String,String> |
getProjectionDefinition() |
protected ORuntimeResult |
getProjectionGroup(Object fieldValue,
OCommandContext iContext) |
Map<String,Object> |
getProjections() |
OCommandDistributedReplicateRequest.QUORUM_TYPE |
getQuorumType()
Returns the quorum type for the command:
NONE: no quorum
READ: configured Read quorum
WRITE: configured Write quorum
ALL: all nodes
|
String |
getSyntax() |
int |
getTemporaryRIDCounter(OCommandContext iContext)
Returns the temporary RID counter assuring it's unique per query tree.
|
protected boolean |
handleResult(OIdentifiable iRecord,
OCommandContext iContext)
Handles the record in result.
|
boolean |
hasGroupBy() |
void |
initContext() |
boolean |
isAnyFunctionAggregates() |
protected boolean |
isUseCache() |
Iterator<OIdentifiable> |
iterator() |
Iterator<OIdentifiable> |
iterator(Map<Object,Object> iArgs) |
protected boolean |
optimizeExecution() |
OCommandExecutorSQLSelect |
parse(OCommandRequest iRequest)
Compile the filter conditions only the first time.
|
protected boolean |
parseFetchplan(String w)
Parses the fetchplan keyword if found.
|
protected void |
parseGroupBy() |
protected boolean |
parseNoCache(String w)
Parses the NOCACHE keyword if found.
|
protected void |
parseOrderBy() |
protected int |
parseProjections() |
protected void |
parseUnwind() |
protected void |
reportTip(String iMessage)
Report the tip to the profiler and collect it in context to be reported by tools like Studio
|
protected void |
revertProfiler(OCommandContext iContext,
OIndex<?> index,
List<Object> keyParams,
OIndexDefinition indexDefinition) |
protected void |
revertSubclassesProfiler(OCommandContext iContext,
int num) |
protected void |
searchInClasses() |
void |
setFetchLimit(int fetchLimit) |
void |
setFetchPlan(String fetchPlan) |
void |
setGroupByFields(List<String> groupByFields) |
void |
setNoCache(boolean noCache) |
void |
setOrderedFields(List<OPair<String,String>> orderedFields) |
void |
setParallel(boolean parallel) |
void |
setProjectionDefinition(Map<String,String> projectionDefinition) |
void |
setProjections(Map<String,Object> projections) |
applyLimitAndSkip, assignLetClauses, evaluateRecord, filter, getDistributedExecutionMode, getDistributedResultManagement, getDistributedTimeout, getRange, getResult, getResultInstance, getTarget, isCacheable, isIdempotent, isLazyIteration, mergeResults, optimize, optimizeBranch, optimizeFunction, parseLet, parseLimit, parseSkip, pushResult, searchInClasses, searchInClasses, searchInClusters, setCompiledFilter, setLazyIteration, setParsedTarget, setRequest, setTargetbindDefaultContextVariables, checkClusterAccess, decodeClassName, getInvolvedClustersOfClasses, getInvolvedClustersOfClusters, getInvolvedClustersOfIndex, parseLock, parseTimeout, preParse, throwParsingException, throwParsingException, throwSyntaxErrorExceptioncheckInterruption, checkInterruption, getContext, getDatabase, getLimit, getParameters, getProgressListener, getSecurityOperationType, getUndoCommand, init, involveSchema, isDistributedExecutingOnLocalNodeFirst, isLocalExecution, setContext, setLimit, setProgressListener, toString, upperCasegetLastWordLength, getWordStatic, nextWord, nextWord, parseOptionalWord, parserGetCurrentChar, parserGetCurrentPosition, parserGetLastSeparator, parserGetLastWord, parserGetPreviousPosition, parserGoBack, parserIsEnded, parserMoveCurrentPosition, parserNextChars, parserNextWord, parserNextWord, parserNextWord, parserOptionalKeyword, parserOptionalWord, parserRequiredKeyword, parserRequiredWord, parserRequiredWord, parserRequiredWord, parserRequiredWord, parserSetCurrentPosition, parserSetEndOfText, parserSetLastSeparator, parserSkipWhiteSpacesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUndoCommand, isDistributedExecutingOnLocalNodeFirstforEach, spliteratorpublic static final String KEYWORD_SELECT
public static final String KEYWORD_ASC
public static final String KEYWORD_DESC
public static final String KEYWORD_ORDER
public static final String KEYWORD_BY
public static final String KEYWORD_GROUP
public static final String KEYWORD_UNWIND
public static final String KEYWORD_FETCHPLAN
public static final String KEYWORD_NOCACHE
public boolean hasGroupBy()
protected boolean isUseCache()
isUseCache in class OCommandExecutorSQLResultsetAbstractpublic OCommandExecutorSQLSelect parse(OCommandRequest iRequest)
parse in interface OCommandExecutorparse in class OCommandExecutorSQLResultsetAbstractiRequest - Command request implementation.#execute(Mappublic Set<String> getInvolvedClusters()
getInvolvedClusters in interface OCommandExecutorgetInvolvedClusters in class OCommandExecutorAbstractpublic boolean isAnyFunctionAggregates()
ture if any of the sql functions perform aggregation, false otherwisepublic Iterator<OIdentifiable> iterator()
iterator in interface Iterable<OIdentifiable>public Iterator<OIdentifiable> iterator(Map<Object,Object> iArgs)
iterator in interface OIterableRecordSourcepublic Object execute(Map<Object,Object> iArgs)
OCommandExecutorexecute in interface OCommandExecutoriArgs - Optional variable arguments to pass to the command.OCommandExecutor.parse(OCommandRequest)public String getSyntax()
getSyntax in interface OCommandExecutorgetSyntax in class OBaseParserpublic String getFetchPlan()
getFetchPlan in interface OCommandExecutorgetFetchPlan in class OCommandExecutorAbstractprotected boolean assignTarget(Map<Object,Object> iArgs)
OCommandExecutorSQLResultsetAbstractassignTarget in class OCommandExecutorSQLResultsetAbstractiArgs - Parameters to bindprotected boolean executeSearchRecord(OIdentifiable id, OCommandContext iContext, boolean callHooks)
protected boolean handleResult(OIdentifiable iRecord, OCommandContext iContext)
handleResult in class OCommandExecutorSQLResultsetAbstractiRecord - Record to handlepublic int getTemporaryRIDCounter(OCommandContext iContext)
getTemporaryRIDCounter in interface OTemporaryRidGeneratorprotected void checkForSystemClusters(ODatabaseDocumentInternal iDatabase, ORID rid)
protected boolean addResult(OIdentifiable iRecord, OCommandContext iContext)
protected void reportTip(String iMessage)
protected ORuntimeResult getProjectionGroup(Object fieldValue, OCommandContext iContext)
protected void parseGroupBy()
protected void parseUnwind()
protected void parseOrderBy()
protected void searchInClasses()
searchInClasses in class OCommandExecutorSQLResultsetAbstractprotected int parseProjections()
protected int extractProjectionNameSubstringEndPosition(String projection)
protected boolean parseFetchplan(String w) throws OCommandSQLParsingException
OCommandSQLParsingExceptionprotected boolean optimizeExecution()
protected void revertSubclassesProfiler(OCommandContext iContext, int num)
protected void revertProfiler(OCommandContext iContext, OIndex<?> index, List<Object> keyParams, OIndexDefinition indexDefinition)
protected boolean parseNoCache(String w) throws OCommandSQLParsingException
OCommandSQLParsingExceptionpublic void initContext()
public void setProjectionDefinition(Map<String,String> projectionDefinition)
public void setFetchLimit(int fetchLimit)
public void setFetchPlan(String fetchPlan)
public void setParallel(boolean parallel)
public void setNoCache(boolean noCache)
public OCommandDistributedReplicateRequest.QUORUM_TYPE getQuorumType()
OCommandDistributedReplicateRequestgetQuorumType in interface OCommandDistributedReplicateRequestCopyright © 2009–2025 OrientDB. All rights reserved.