sdaiIsMember


Determines whether an element with the specified value exists in the specified aggregate. This operation returns sdaiTRUE if at least one element with the specified value exist in the actual aggregate, else sdaiFALSE is returned. The actual element value is specified by the primitive type of the value and the actual value.
The model that holds the actual aggregate must be open before this operation can be successfully performed.
Header:
#include "sdai.h"
Prototype:
SdaiBoolean sdaiIsMember(SdaiAggr          aggregate,
                          SdaiPrimitiveType valueType, 
                          ...); 
Arguments:

aggregate

A numeric aggregateID that uniquely identifies the actual aggregate in the EDMdatabase.
The aggregateID is returned when the aggregate is created or it can be retrieved by an _EDMinterface_ get operation.

valueType

The data type, i.e. the primitive type of the data value to be search for in the actual aggregate. This <valueType> must be the same or a compatible type of the primitive type of the actual aggregate element primitive type defined in the related EXPRESS schema. The primitive type sdaiSELECT can be used to specify all data types. The primitive type sdaiADB can be used to specify all data types except typed values.
The primitive type sdaiINTEGER is compatible with sdaiREAL, and sdaiBOOLEAN is compatible with sdaiLOGICAL, hence conversion between these compatible data types will be performed when required.

value

The data value to be search for in the actual aggregate.

Returns:
sdaiTRUE : An element with the specified data type, i.e. primitive type, and value is found in the actual aggregate.
sdaiFALSE : No element with the specified data type, i.e. primitive type, and value is found in the actual aggregate. Use sdaiErrorQuery to check for error during operation.
Example:
SdaiBoolean result;
SdaiAggr aggrId, aggrId2;
SdaiErrorCode errCode;
...
result = sdaiIsMember(aggrId, sdaiSTRING, "mystring");
if ((result == sdaiFALSE) && (errCode = sdaiErrorQuery())) {
/* Error in operation */ 
printf("\nError: %s in sdaiIsMember \n", 
edmiGetErrorText(errCode)); 
goto error; 
}
result = sdaiIsMember(aggrId2, sdaiREAL, 3.14);
...