Interface OqlStatement
public interface OqlStatement
Represents an OQL data manipulation statement.
Currently, DELETE, UPDATE and INSERT INTO SELECT have 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 Summary
Modifier and TypeMethodDescriptionintExecute this OQL statement.setVariable(String name, boolean value) Sets a variable with a value of typeboolean.setVariable(String name, double value) Sets a variable with a value of typedouble.setVariable(String name, int value) Sets a variable with a value of typeint.setVariable(String name, long value) Sets a variable with a value of typelong.setVariable(String name, IMendixIdentifier identifier) Sets a variable with a value of typeIMendixIdentifier.setVariable(String name, IMendixObject object) Sets a variable with a value of typeIMendixObject.setVariable(String name, String value) Sets a variable with a value of typeString.setVariable(String name, BigDecimal value) Sets a variable with a value of typeBigDecimal.setVariable(String name, Collection<?> values) Sets a variable with a value of typeCollection.setVariable(String name, Date value) Sets a variable with a value of typeDate.
-
Method Details
-
execute
Execute this OQL statement.- Parameters:
context- the context to be used to process this request- Returns:
- The number of affected objects
-
setVariable
Sets a variable with a value of typeBigDecimal.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeboolean.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typedouble.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeint.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typelong.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeIMendixObject.- Parameters:
name- name of the variable referenced in the expression (without '$')object- aIMendixObjectvalue. Will be replaced by itsIMendixIdentifierin the query.- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeIMendixIdentifier.- Parameters:
name- name of the variable referenced in the expression (without '$')identifier- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeString.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated statement instance
-
setVariable
Sets a variable with a value of typeDate.- Parameters:
name- name of the variable referenced in the expression (without '$')value- the value of the variable- Returns:
- the updated query instance
- Since:
- 11.10.0
-
setVariable
Sets a variable with a value of typeCollection.- 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
-