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>

public class OSQLMethodBeforeUpdate extends OAbstractSQLMethod
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 db.live("select from Person where @this.beforeUpdate().name != name
Author:
Luigi Dell'Aquila (l.dellaquila--(at)--orientdb.com)
  • Field Details

  • Constructor Details

    • OSQLMethodBeforeUpdate

      public OSQLMethodBeforeUpdate()
  • Method Details

    • getSyntax

      public String getSyntax()
      Description copied from interface: OSQLMethod
      Returns a convinient SQL String representation of the method.

      Example :

        field.myMethod( param1, param2, [optionalParam3])
       
      This text will be used in exception messages.
      Specified by:
      getSyntax in interface OSQLMethod
      Overrides:
      getSyntax in class OAbstractSQLMethod
      Returns:
      String , never null.
    • execute

      public Object execute(Object iThis, OIdentifiable iCurrentRecord, OCommandContext iContext, Object ioResult, Object[] iParams)
      Description copied from interface: OSQLMethod
      Process a record.
      Parameters:
      iThis -
      iCurrentRecord - : current record
      iContext - execution context
      ioResult - : field value
      iParams - : function parameters, number is ensured to be within minParams and maxParams.
      Returns:
      evaluation result