public class OLuceneSearchOnClassFunction extends OLuceneSearchFunctionTemplate
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
maxParams, minParams, name
Constructor and Description |
---|
OLuceneSearchOnClassFunction() |
Modifier and Type | Method and Description |
---|---|
Object |
execute(Object iThis,
OIdentifiable iCurrentRecord,
Object iCurrentResult,
Object[] params,
OCommandContext ctx)
Process a record.
|
boolean |
filterResult()
A function can act both as transformation or filtering records.
|
String |
getName()
Function name, the name is used by the sql parser to identify a call this function.
|
String |
getSyntax()
Returns a convenient SQL String representation of the function.
|
protected OLuceneFullTextIndex |
searchForIndex(OFromClause target,
OCommandContext ctx,
OExpression... args) |
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, estimate, shouldExecuteAfterSearch
aggregateResults, config, getDistributedStorageId, getMaxParams, getMinParams, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
aggregateResults, config, getMaxParams, getMinParams, getResult, mergeDistributedResult, setResult, shouldMergeDistributedResult
public static final String NAME
public String getName()
OSQLFunction
getName
in interface OSQLFunction
getName
in class OSQLFunctionAbstract
public Object execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] params, OCommandContext ctx)
OSQLFunction
iCurrentRecord
- : current recordiCurrentResult
- TODOparams
- : function parameters, number is ensured to be within minParams and maxParams.ctx
- : object calling this functionpublic String getSyntax()
OSQLFunction
Example :
myFunction( param1, param2, [optionalParam3])
This text will be used in exception messages.
public boolean filterResult()
OSQLFunction
Function should return null for the execute method if the record must be excluded.
filterResult
in interface OSQLFunction
filterResult
in class OSQLFunctionAbstract
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]protected OLuceneFullTextIndex searchForIndex(OFromClause target, OCommandContext ctx, OExpression... args)
searchForIndex
in class OLuceneSearchFunctionTemplate
Copyright © 2009–2020 OrientDB. All rights reserved.