Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
SYNTAX:
 
xpxSelectAggrElements (aggrId               : AGGREGATE OF GENERIC;                        condition            : STRING;                        options              : INTEGER;                        firstIndex, maxHits  : INTEGER;                       VAR indexOfLastFound : INTEGER;                       VAR actualHits       : INTEGER;                        resultAggrId         : SET OF INTEGER)                        status               : INTEGER;
 
To be completed.
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::

Description:

aggrId

A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase. This may be any type of aggregate, both persistant and scratch with elements of primitive data types.

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

options

Not used.

firstIndex

The aggregate index from which to start searching for matching elements.

maxHits

Specifies the maximum number of indexes that may be returned in the list.

indexOfLastFound

The index of the last found matching element. This return value enables incremental search for matching elements. See example below.

actualHits

The number of matching elements found.

resultAggrId

A numeric aggregateID that uniquely identifies the volatile list that will contain the index of each matching element.

 
This function is equivalent to the EDMinterface function edmiSelectAggrElements.
 
Example:
. . .
 
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;
 
. . .

  • No labels