public abstract class OQueryOperator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OQueryOperator.ORDER |
Modifier and Type | Field and Description |
---|---|
protected static Class<?>[] |
DEFAULT_OPERATORS_ORDER
Default operator order.
|
int |
expectedRightWords |
boolean |
expectsParameters |
String |
keyword |
int |
precedence |
boolean |
unary |
Modifier | Constructor and Description |
---|---|
protected |
OQueryOperator(String iKeyword,
int iPrecedence,
boolean iUnary) |
protected |
OQueryOperator(String iKeyword,
int iPrecedence,
boolean iUnary,
int iExpectedRightWords) |
protected |
OQueryOperator(String iKeyword,
int iPrecedence,
boolean iUnary,
int iExpectedRightWords,
boolean iExpectsParameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeMerged() |
boolean |
canShortCircuit(Object l) |
OQueryOperator.ORDER |
compare(OQueryOperator other)
Check priority of this operator compare to given operator.
|
OQueryOperator |
configure(List<String> iParams)
Default State-less implementation: does not save parameters and just return itself
|
abstract Object |
evaluateRecord(OIdentifiable iRecord,
ODocument iCurrentResult,
OSQLFilterCondition iCondition,
Object iLeft,
Object iRight,
OCommandContext iContext,
ODocumentSerializer serializer) |
Stream<ORawPair<Object,ORID>> |
executeIndexQuery(OCommandContext iContext,
OIndex index,
List<Object> keyParams,
boolean ascSortOrder)
Performs index query and returns index stream which presents subset of index data which
corresponds to result of execution of given operator.
|
abstract ORID |
getBeginRidRange(Object iLeft,
Object iRight) |
abstract ORID |
getEndRidRange(Object iLeft,
Object iRight) |
abstract OIndexReuseType |
getIndexReuseType(Object iLeft,
Object iRight)
Returns hint how index can be used to calculate result of operator execution.
|
OIndexSearchResult |
getOIndexSearchResult(OClass iSchemaClass,
OSQLFilterCondition iCondition,
List<OIndexSearchResult> iIndexSearchResults,
OCommandContext context) |
String |
getSyntax() |
boolean |
isSupportingBinaryEvaluate() |
boolean |
isUnary() |
String |
toString() |
protected void |
updateProfiler(OCommandContext iContext,
OIndex index,
List<Object> keyParams,
OIndexDefinition indexDefinition) |
protected static final Class<?>[] DEFAULT_OPERATORS_ORDER
WARNING: ORDER IS IMPORTANT TO AVOID SUB-STRING LIKE "IS" and AND "INSTANCEOF": INSTANCEOF MUST BE PLACED BEFORE! AND ALSO FOR PERFORMANCE (MOST USED BEFORE)
public final String keyword
public final int precedence
public final int expectedRightWords
public final boolean unary
public final boolean expectsParameters
protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary)
protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary, int iExpectedRightWords)
protected OQueryOperator(String iKeyword, int iPrecedence, boolean iUnary, int iExpectedRightWords, boolean iExpectsParameters)
public abstract Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft, Object iRight, OCommandContext iContext, ODocumentSerializer serializer)
public abstract OIndexReuseType getIndexReuseType(Object iLeft, Object iRight)
iLeft
- Value of left query parameter.iRight
- Value of right query parameter.public OIndexSearchResult getOIndexSearchResult(OClass iSchemaClass, OSQLFilterCondition iCondition, List<OIndexSearchResult> iIndexSearchResults, OCommandContext context)
public Stream<ORawPair<Object,ORID>> executeIndexQuery(OCommandContext iContext, OIndex index, List<Object> keyParams, boolean ascSortOrder)
Query that should be executed can be presented like: [[property0 = keyParam0] and [property1 = keyParam1] and] propertyN operator keyParamN.
It is supped that index which passed in as parameter is used to index properties listed above and responsibility of given method execute query using given parameters.
Multiple parameters are passed in to implement composite indexes support.
iContext
- index
- Instance of index that will be used to calculate result of operator execution.keyParams
- Parameters of query is used to calculate query result.ascSortOrder
- Data returned by cursors should be sorted in ascending or descending order.null
otherwise.public OQueryOperator configure(List<String> iParams)
iParams
- public String getSyntax()
public boolean isUnary()
public OQueryOperator.ORDER compare(OQueryOperator other)
other
- protected void updateProfiler(OCommandContext iContext, OIndex index, List<Object> keyParams, OIndexDefinition indexDefinition)
public boolean canShortCircuit(Object l)
public boolean canBeMerged()
public boolean isSupportingBinaryEvaluate()
Copyright © 2009–2020 OrientDB. All rights reserved.