...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpxSelectAggrElements (aggrId : AGGREGATE OF GENERIC;
condition : STRING;
options : INTEGER;
firstIndex, maxHits : INTEGER;
VAR indexOfLastFound : INTEGER;
VAR actualHits : INTEGER;
VAR resultAggrId : LIST OF INTEGER)
status : INTEGER;
|
The xpxSelectAggrElements function produces a list containing the indexes of all the elements of an aggregate that matches a given Express-X logical expression. This function only handles aggregates with primitive data type elements.
...
Argument::
...
Arguments
...
Type | Name | Comment | |||||||
AGGREGATE OF GENERIC | aggrId | A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase | .This may be any type of aggregate, both | persistantpersistent and scratch with elements of primitive data types. | |||||
STRING | condition | A conditional statement, written in Express-X, that the aggregate elements shall match. References to the element it self is done by the symbol SELF. A string comparing condition may therefore be written | ?SELF = SCHMIDT | ?or | ?SELF LIKE SCHMIDT | ?or even | ?xpxLIKE(SELF, SCHMIDT) | ?An unset condition, will match all aggregate elements. All symbolic Express-X logical expressions are legal <condition> values. The <condition> argument will be compiled by the EDMexpressXCompiler | |
INTEGER | options | Not used. | |||||||
INTEGER | firstIndex | The aggregate index from which to start searching for matching elements. | |||||||
INTEGER | maxHits | Specifies the maximum number of indexes that may be returned in the list. | |||||||
INTEGER | indexOfLastFound | The index of the last found matching element. This return value enables incremental search for matching elements. See example below. | |||||||
INTEGER | actualHits | The number of matching elements found. | |||||||
LIST OF INTEGER | resultAggrId | A numeric aggregateID that uniquely identifies the volatile list that will contain the index of each matching element. |
...
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
...
Code Block | ||
---|---|---|
| ||
firstIndex = 1; |
...
maxHits := 10; |
...
actualHits := maxHits; |
...
WHEN (actualHits = maxHits); |
...
BEGIN |
...
stat := xpxSelectAggrElements(myAggrId, |
...
"SELF = SHCMIDT |
...
", |
...
0, firstIndex, maxHits, lastMatch, |
...
actualHits, indexList); |
...
(* Process matching elements here *) |
...
firstIndex := lastMatch + 1; |
...
END; |
. . .
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|