Class OSQLMethodBeforeUpdate
java.lang.Object
com.orientechnologies.orient.core.sql.method.misc.OAbstractSQLMethod
com.orientechnologies.orient.core.sql.functions.conversion.OSQLMethodBeforeUpdate
- All Implemented Interfaces:
OSQLMethod,Comparable<OSQLMethod>
ONLY FOR LIVE QUERY. Returns the value of current record (as an OResult) before it was updated.
Null if the record is new
eg. on update, get only records whose "name" attribute was update
eg. on update, get only records whose "name" attribute was update
db.live("select from Person where @this.beforeUpdate().name != name
- Author:
- Luigi Dell'Aquila (l.dellaquila--(at)--orientdb.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(Object iThis, OIdentifiable iCurrentRecord, OCommandContext iContext, Object ioResult, Object[] iParams) Process a record.Returns a convinient SQL String representation of the method.Methods inherited from class com.orientechnologies.orient.core.sql.method.misc.OAbstractSQLMethod
compareTo, getMaxParams, getMinParams, getName, getParameterValue, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
OSQLMethodBeforeUpdate
public OSQLMethodBeforeUpdate()
-
-
Method Details
-
getSyntax
Description copied from interface:OSQLMethodReturns a convinient SQL String representation of the method.Example :
field.myMethod( param1, param2, [optionalParam3])
This text will be used in exception messages.- Specified by:
getSyntaxin interfaceOSQLMethod- Overrides:
getSyntaxin classOAbstractSQLMethod- Returns:
- String , never null.
-
execute
public Object execute(Object iThis, OIdentifiable iCurrentRecord, OCommandContext iContext, Object ioResult, Object[] iParams) Description copied from interface:OSQLMethodProcess a record.- Parameters:
iThis-iCurrentRecord- : current recordiContext- execution contextioResult- : field valueiParams- : function parameters, number is ensured to be within minParams and maxParams.- Returns:
- evaluation result
-