public class OSTDistanceSphereFunction extends OSpatialFunctionAbstractIndexable
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
maxParams, minParams, name
Constructor and Description |
---|
OSTDistanceSphereFunction() |
Modifier and Type | Method and Description |
---|---|
long |
estimate(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
estimates the number of entries returned by searchFromTarget() with these parameters
|
Object |
execute(Object iThis,
OIdentifiable iCurrentRecord,
Object iCurrentResult,
Object[] iParams,
OCommandContext iContext)
Process a record.
|
String |
getSyntax()
Returns a convenient SQL String representation of the function.
|
protected void |
onAfterParsing(Map<String,Object> params,
OExpression[] args,
OCommandContext ctx,
Object rightValue) |
protected String |
operator() |
Iterable<OIdentifiable> |
searchFromTarget(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
returns all the entries belonging to the target that match the binary condition where this
function appears
|
allowsIndexedExecution, canExecuteInline, getDb, intersect, results, searchForIndex, shouldExecuteAfterSearch
toShape
aggregateResults, config, filterResult, getDistributedStorageId, getMaxParams, getMinParams, getName, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
aggregateResults, config, filterResult, getMaxParams, getMinParams, getName, getResult, mergeDistributedResult, setResult, shouldMergeDistributedResult
public static final String NAME
public Object execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] iParams, OCommandContext iContext)
OSQLFunction
iCurrentRecord
- : current recordiCurrentResult
- TODOiParams
- : function parameters, number is ensured to be within minParams and maxParams.iContext
- : object calling this functionpublic String getSyntax()
OSQLFunction
Example :
myFunction( param1, param2, [optionalParam3])
This text will be used in exception messages.
protected String operator()
operator
in class OSpatialFunctionAbstractIndexable
public Iterable<OIdentifiable> searchFromTarget(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunction
target
- the query targetoperator
- the operator after the function, eg. in
select from Foo where myFunction(name) > 4
the operator is >rightValue
- the value that has to be compared to the function result, eg. in
select from Foo where myFunction(name) > 4
the right value is 4ctx
- the command context for this queryargs
- the function arguments, eg. in select from Foo where myFunction(name) > 4
the arguments are [name]public long estimate(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunction
estimate
in interface OIndexableSQLFunction
estimate
in class OSpatialFunctionAbstractIndexable
target
- the query targetoperator
- the operator after the function, eg. in
select from Foo where myFunction(name) > 4
the operator is >rightValue
- the value that has to be compared to the function result, eg. in
select from Foo where myFunction(name) > 4
the right value is 4ctx
- the command context for this queryargs
- the function arguments, eg. in select from Foo where myFunction(name) > 4
the arguments are [name]protected void onAfterParsing(Map<String,Object> params, OExpression[] args, OCommandContext ctx, Object rightValue)
onAfterParsing
in class OSpatialFunctionAbstractIndexable
Copyright © 2009–2020 OrientDB. All rights reserved.