Class OSQLFunctionMultiValueAbstract<T>
java.lang.Object
com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
com.orientechnologies.orient.core.sql.functions.coll.OSQLFunctionMultiValueAbstract<T>
- All Implemented Interfaces:
OSQLFunction
- Direct Known Subclasses:
OSQLFunctionDifference,OSQLFunctionDocument,OSQLFunctionIntersect,OSQLFunctionList,OSQLFunctionMap,OSQLFunctionSet,OSQLFunctionSymmetricDifference,OSQLFunctionUnionAll
Abstract class for multi-value based function implementations.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
configuredParametersFields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
maxParams, minParams, name -
Constructor Summary
ConstructorsConstructorDescriptionOSQLFunctionMultiValueAbstract(String iName, int iMinParams, int iMaxParams) -
Method Summary
Modifier and TypeMethodDescriptionbooleanA function can make calculation on several records before returning a result.getResult(OCommandContext ctx) Only called when function aggregates results after all records have been passed to the function.booleanThis method correspond to distributed query executionMethods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
config, toStringMethods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
filterResult, getDatabase, getDistributedStorageId, getMaxParams, getMinParams, getName, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.sql.functions.OSQLFunction
execute, getSyntax
-
Field Details
-
context
-
-
Constructor Details
-
OSQLFunctionMultiValueAbstract
-
-
Method Details
-
aggregateResults
public boolean aggregateResults()Description copied from interface:OSQLFunctionA function can make calculation on several records before returning a result.Example of such function : sum, count, max, min ...
The final result of the aggregation is obtain by calling
OSQLFunction.getResult(OCommandContext)- Specified by:
aggregateResultsin interfaceOSQLFunction- Overrides:
aggregateResultsin classOSQLFunctionAbstract- Returns:
- true if function aggregate results
-
getResult
Description copied from interface:OSQLFunctionOnly called when function aggregates results after all records have been passed to the function.- Specified by:
getResultin interfaceOSQLFunction- Overrides:
getResultin classOSQLFunctionAbstract- Parameters:
ctx- TODO- Returns:
- Aggregation result
-
shouldMergeDistributedResult
public boolean shouldMergeDistributedResult()Description copied from interface:OSQLFunctionThis method correspond to distributed query execution- Specified by:
shouldMergeDistributedResultin interfaceOSQLFunction- Overrides:
shouldMergeDistributedResultin classOSQLFunctionAbstract- Returns:
trueif results that comes from different nodes need to be merged to obtain valid one,falseotherwise
-