...
Code Block |
---|
language | cpp |
---|
theme | Confluence |
---|
|
FUNCTION xpxSelectInstancesBN (modelId : GENERIC;
entityName, condition : STRING;
options : INTEGER;
firstIndex, maxHits : INTEGER;
VAR indexOfLastFound : INTEGER;
VAR actualHits : INTEGER;
VAR foundInstances : SET OF GENERIC)
status : INTEGER;
|
The xpxSelectInstancesBN function search in the specified model for instances of the specified type that match the specified condition. Optionally all subtype instances of the specified type will be search as well.
The condition is specified as any legal symbolic Express-X logical expression. All instances of the specified type in the specified model will match an empty condition, i.e. the <condition> argument set to NULL.
Each matching instance is identified by a numeric instanceID that uniquely identifies an instance in the EDMdatabase. All possible matching instances will be collected in a temporarily aggregate, hence this aggregate will be queried for matching instances. The index of the first aggregate element to test for an instance that match the specified condition, and the maximum number of matching instances to return, are specified as input arguments to the function. The actual number of matching instances returned and the ?index of the last returned matching instance in the aggregate? are returned from the operation. This makes it convenient to query the aggregate by the xpxSelectInstancesBN function in an incremental way.
The <condition> argument will be compiled by the EDMexpressXCompiler.
The specified query will fully be executed by the EDMexpressVM.
The actual model to query must be open before this operation can be successfully performed.
When the input arguments ((maxHits == 0) && (foundInstances == NULL)) no instanceId or elementNumber will be returned. Only the number of matching instances/elements will be returned.
Arguments
...
1 | Type | Name | Comment |
2 | GENERIC | modelId | A numeric modelID that uniquely identifies the data model of interest in the EDMdatabase . |
3 | STRING | entityName | Specifies the name of the entity that defines the actual instance type to query. Entity names are case insensitive. |
...
4 | STRING | condition | Specifies the condition the target instances should match. All instances in the specified aggregate match an empty condition, i.e., <condition> = NULL. All legal symbolic Express-X logical expressions are a legal <condition> value. This <condition> argument will be compiled by the EDMexpressXCompiler |
5 | INTEGER | options | see below. The <options> value can be specified as a bitwise OR between the actual options to enable. |
6 | INTEGER | firstIndex | |
7 | INTEGER | maxHits | |
8 | INTEGER | indexOfLastFound | |
9 | INTEGER | actualHits | |
10 | SET OF GENERIC | foundInstances | |
Return Value
...
Insert excerpt |
---|
| US:_r_XPX_Return_Value |
---|
| US:_r_XPX_Return_Value |
---|
nopanel | true |
---|
|
Options
...
Option | Comment |
SUBTYPES | Specifies that in addition to all instances of the type specified by the <entityName> argument, all subtype instances of the specified type should be queried as well. |
Example
...
Code Block |
---|
|
<Missing Example> |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "extension_schema" and parent = "5636522" |
---|
|