Package com.mendix.datastorage
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 Summary
Modifier and TypeMethodDescriptionint
Execute 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
.
-
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
- aIMendixObject
value. Will be replaced by itsIMendixIdentifier
in 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 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
-