Interface OqlStatement


public interface OqlStatement
Represents an OQL update statement. This API is experimental. Currently only DELETE has been implemented.

In OQL statements it is possible to add variables. A variable can be denoted with '$', e.g. a valid statement syntax could be DELETE FROM Entity.Ref WHERE Attribute = $value.

  • Method Details

    • execute

      int execute(IContext context)
      Execute this OQL statement.
      Parameters:
      context - the context to be used to process this request
      Returns:
      The number of affected objects
    • setVariable

      OqlStatement setVariable(String name, BigDecimal value)
      Sets a variable with a value of type BigDecimal.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, boolean value)
      Sets a variable with a value of type boolean.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, double value)
      Sets a variable with a value of type double.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, int value)
      Sets a variable with a value of type int.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, long value)
      Sets a variable with a value of type long.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, IMendixObject object)
      Sets a variable with a value of type IMendixObject.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      object - a IMendixObject value. Will be replaced by its IMendixIdentifier in the query.
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, IMendixIdentifier identifier)
      Sets a variable with a value of type IMendixIdentifier.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      identifier - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, String value)
      Sets a variable with a value of type String.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      value - the value of the variable
      Returns:
      the updated statement instance
    • setVariable

      OqlStatement setVariable(String name, Collection<?> values)
      Sets a variable with a value of type Collection.
      Parameters:
      name - name of the variable referenced in the expression (without '$')
      values - the value of the variable as a collection
      Returns:
      the updated statement instance