xpxSelectInstancesBN

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


1TypeNameComment
2GENERICmodelIdA numeric modelID that uniquely identifies the data model of interest in the EDMdatabase .
3STRINGentityNameSpecifies the name of the entity that defines the actual instance type to query. Entity names are case insensitive.
4STRINGconditionSpecifies 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
5INTEGERoptionssee below. The <options> value can be specified as a bitwise OR between the actual options to enable.
6INTEGERfirstIndexAll the instances of entities are kept in entity extents. All the entity extents of the entities that are to be queried (subtypes may also be queried) are joined into a single aggregate of instances. The position in this aggregate to start reading from is specified by this parameter. This way, huge populations may be incrementally queried by setting this argument equal to one more than the value of <indexOfLastFound> that resulted from the previous iterative call to this function.
7INTEGERmaxHitsThe greatest allowed number of hits in the query result. When this number of matching instances is found, the search for additional matches will stop.
8INTEGERindexOfLastFoundThe index of the "last returned matching element". This argument enables the caller to search for instances in an incremental way by specifying this returned "index value plus one" as the input to the next xpxSelectAggrInstancesEx function and so on.
9INTEGERactualHitsThe number of matching instances found. If this value is equal to the <maxHits> argument, it is a possibility that there may be more matching instances among the queried entity types.
10SET OF GENERICfoundInstances 

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_XPX_Return_Value'.

Options


OptionComment
SUBTYPESSpecifies 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


<Missing Example>

 

See also

Filter by label

There are no items with the selected labels at this time.

Â