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 »


 
Deletes all aggregate elements in the specified aggregate that have the specified data value.
When the specified aggregate is an ARRAY, the actual array elements will not be deleted but the actual array elements will be unset, i.e. the value will be set to indeterminate.
This function is only applicable to aggregates owned by application instances. The actual data model that holds the specified aggregate must be open for write access before this function can be successfully performed.
Related functions: sdaiIsMember , sdaiDelete , sdaiUnsetAggrByIndex , sdaiUnsetAggrByIterator .
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDeleteAggrValue(SdaiAggr          aggrId,
                               SdaiPrimitiveType valueType, 
                                ... ); 
Arguments:

aggrId

A numeric aggregateID that uniquely identifies the actual aggregate in the EDMdatabase.

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 deleted from the specified aggregate. The combination of the arguments <valueType> and <value> uniquely identifies an aggregate element value.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiAggr aggrId;
...
if (rstat = edmiDeleteAggrValue(aggrId,
sdaiSTRING, 
"abcd1234")) { 
 
/* Error in operation */ 
printf("\nError in edmiDeleteAggrValue: %s\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
. . .

  • No labels