public class OSQLFunctionCoalesce extends OSQLFunctionAbstract
field/value
not null parameter. if no field/value
is
not null, returns null.
Syntax:
coalesce(<field|value>[,<field|value>]*)
Examples:
SELECT coalesce('a', 'b') FROM ... -> 'a' SELECT coalesce(null, 'b') FROM ... -> 'b' SELECT coalesce(null, null, 'c') FROM ... -> 'c' SELECT coalesce(null, null) FROM ... -> null
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
maxParams, minParams, name
Constructor and Description |
---|
OSQLFunctionCoalesce() |
Modifier and Type | Method and Description |
---|---|
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.
|
aggregateResults, config, filterResult, getDistributedStorageId, getMaxParams, getMinParams, getName, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toString
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.
Copyright © 2009–2020 OrientDB. All rights reserved.