Class OSQLFunctionSysdate
java.lang.Object
com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
com.orientechnologies.orient.core.sql.functions.misc.OSQLFunctionSysdate
- All Implemented Interfaces:
OSQLFunction
Returns the current date time.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
maxParams, minParams, name -
Constructor Summary
ConstructorsConstructorDescriptionGet the date at construction to have the same date for all the iteration. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaggregateResults(Object[] configuredParameters) execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] iParams, OCommandContext iContext) Process a record.getResult(OCommandContext ctx) Only called when function aggregates results after all records have been passed to the function.Returns a convenient SQL String representation of the function.Methods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
aggregateResults, config, filterResult, getDatabase, getDistributedStorageId, getMaxParams, getMinParams, getName, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
OSQLFunctionSysdate
public OSQLFunctionSysdate()Get the date at construction to have the same date for all the iteration.
-
-
Method Details
-
execute
public Object execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] iParams, OCommandContext iContext) Description copied from interface:OSQLFunctionProcess a record.iCurrentRecord- : current recordiCurrentResult- TODOiParams- : function parameters, number is ensured to be within minParams and maxParams.iContext- : object calling this function- Returns:
- function result, can be null. Special cases : can be null if function aggregate results, can be null if function filter results : this mean result is excluded
-
aggregateResults
-
getSyntax
Description copied from interface:OSQLFunctionReturns a convenient SQL String representation of the function.Example :
myFunction( param1, param2, [optionalParam3])
This text will be used in exception messages.
- Returns:
- String , never null.
-
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
-