Class OCommandExecutorSQLAbstract
java.lang.Object
com.orientechnologies.common.parser.OBaseParser
com.orientechnologies.orient.core.command.OCommandExecutorAbstract
com.orientechnologies.orient.core.sql.OCommandExecutorSQLAbstract
- All Implemented Interfaces:
OCommandExecutor
- Direct Known Subclasses:
OCommandExecutorSQLAlterClass,OCommandExecutorSQLAlterCluster,OCommandExecutorSQLAlterDatabase,OCommandExecutorSQLAlterProperty,OCommandExecutorSQLAlterSequence,OCommandExecutorSQLCreateClass,OCommandExecutorSQLCreateCluster,OCommandExecutorSQLCreateFunction,OCommandExecutorSQLCreateIndex,OCommandExecutorSQLCreateLink,OCommandExecutorSQLCreateProperty,OCommandExecutorSQLCreateSequence,OCommandExecutorSQLCreateUser,OCommandExecutorSQLDelegate,OCommandExecutorSQLDelete,OCommandExecutorSQLDeleteVertex,OCommandExecutorSQLDropClass,OCommandExecutorSQLDropCluster,OCommandExecutorSQLDropIndex,OCommandExecutorSQLDropProperty,OCommandExecutorSQLDropSequence,OCommandExecutorSQLDropUser,OCommandExecutorSQLHARemoveServer,OCommandExecutorSQLHAStatus,OCommandExecutorSQLHASyncCluster,OCommandExecutorSQLHASyncDatabase,OCommandExecutorSQLLiveUnsubscribe,OCommandExecutorSQLOptimizeDatabase,OCommandExecutorSQLPermissionAbstract,OCommandExecutorSQLRebuildIndex,OCommandExecutorSQLResultsetAbstract,OCommandExecutorSQLSetAware,OCommandExecutorSQLTruncateClass,OCommandExecutorSQLTruncateCluster,OCommandExecutorSQLTruncateRecord
SQL abstract Command Executor implementation.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected OStatementprotected longprotected OCommandContext.TIMEOUT_STRATEGYFields inherited from class com.orientechnologies.orient.core.command.OCommandExecutorAbstract
context, limit, parameters, progressListenerFields inherited from class com.orientechnologies.common.parser.OBaseParser
parserText, parserTextUpperCase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected booleancheckClusterAccess(ODatabaseDocument db, String iClusterName) protected StringThe command is replicatedgetInvolvedClustersOfClasses(Collection<String> iClassNames) getInvolvedClustersOfClusters(Collection<String> iClusterNames) getInvolvedClustersOfIndex(String iIndexName) booleanReturns true if the command doesn't change the database, otherwise false.protected StringParses the lock keyword if found.protected booleanParses the timeout keyword if found.protected StringpreParse(String queryText, OCommandRequest iRequest) protected voidthrowParsingException(String iText) protected voidthrowParsingException(String iText, Exception e) protected voidthrowSyntaxErrorException(String iText) Throws a syntax error exception.Methods inherited from class com.orientechnologies.orient.core.command.OCommandExecutorAbstract
checkInterruption, checkInterruption, getContext, getDatabase, getDistributedResultManagement, getDistributedTimeout, getFetchPlan, getInvolvedClusters, getLimit, getParameters, getProgressListener, getSecurityOperationType, getUndoCommand, init, involveSchema, isCacheable, isDistributedExecutingOnLocalNodeFirst, isLocalExecution, mergeResults, setContext, setLimit, setProgressListener, toStringMethods inherited from class com.orientechnologies.common.parser.OBaseParser
getLastWordLength, getSyntax, getWordStatic, nextWord, nextWord, parseOptionalWord, parserGetCurrentChar, parserGetCurrentPosition, parserGetLastSeparator, parserGetLastWord, parserGetPreviousPosition, parserGoBack, parserIsEnded, parserMoveCurrentPosition, parserNextChars, parserNextWord, parserNextWord, parserNextWord, parserOptionalKeyword, parserOptionalWord, parserRequiredKeyword, parserRequiredWord, parserRequiredWord, parserRequiredWord, parserSetCurrentPosition, parserSetEndOfText, parserSetLastSeparator, parserSkipWhiteSpacesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.command.OCommandExecutor
execute, getSyntax, parse
-
Field Details
-
KEYWORD_FROM
- See Also:
-
KEYWORD_LET
- See Also:
-
KEYWORD_WHERE
- See Also:
-
KEYWORD_LIMIT
- See Also:
-
KEYWORD_SKIP
- See Also:
-
KEYWORD_OFFSET
- See Also:
-
KEYWORD_TIMEOUT
- See Also:
-
KEYWORD_LOCK
- See Also:
-
KEYWORD_RETURN
- See Also:
-
KEYWORD_KEY
- See Also:
-
KEYWORD_RID
- See Also:
-
CLUSTER_PREFIX
- See Also:
-
CLASS_PREFIX
- See Also:
-
INDEX_PREFIX
- See Also:
-
KEYWORD_UNSAFE
- See Also:
-
INDEX_VALUES_PREFIX
- See Also:
-
INDEX_VALUES_ASC_PREFIX
- See Also:
-
INDEX_VALUES_DESC_PREFIX
- See Also:
-
DICTIONARY_PREFIX
- See Also:
-
METADATA_PREFIX
- See Also:
-
METADATA_SCHEMA
- See Also:
-
METADATA_INDEXMGR
- See Also:
-
METADATA_STORAGE
- See Also:
-
METADATA_DATABASE
- See Also:
-
METADATA_DISTRIBUTED
- See Also:
-
DEFAULT_PARAM_USER
- See Also:
-
timeoutMs
protected long timeoutMs -
timeoutStrategy
-
preParsedStatement
-
-
Constructor Details
-
OCommandExecutorSQLAbstract
public OCommandExecutorSQLAbstract()
-
-
Method Details
-
getDistributedExecutionMode
The command is replicated- Returns:
-
isIdempotent
public boolean isIdempotent()Description copied from interface:OCommandExecutorReturns true if the command doesn't change the database, otherwise false. -
throwSyntaxErrorException
Description copied from class:OBaseParserThrows a syntax error exception.- Specified by:
throwSyntaxErrorExceptionin classOBaseParser- Parameters:
iText- Text about the problem.
-
throwParsingException
-
throwParsingException
-
parseTimeout
Parses the timeout keyword if found.- Throws:
OCommandSQLParsingException
-
parseLock
Parses the lock keyword if found.- Throws:
OCommandSQLParsingException
-
getInvolvedClustersOfClasses
-
getInvolvedClustersOfClusters
-
getInvolvedClustersOfIndex
-
checkClusterAccess
-
bindDefaultContextVariables
protected void bindDefaultContextVariables() -
preParse
-
decodeClassName
-