sdaiDeleteAggr
Deletes the specified aggregate instance from the EDMdatabase.
Only independent scratch aggregates, subtype aggregates and union aggregates can be deleted by this operation. If the aggregate to delete is a nested scratch aggregate, then all belonging scratch child aggregates will be deleted as well.
Aggregates owned by application instances can be deleted by sdaiUnsetAttr and sdaiUnsetAttrBN operations. Such aggregates will implicitly be deleted when the owning application instance is deleted.
Related functions: edmiDeleteAggr, edmiCreateScratchAggr , edmiCreateNestedScratchAggr , edmiCreateUnionAggr , edmiCreateUnionAggrBN edmiCreateSubtypeAggr , edmiCreateSubtypeAggrBN
Header:
#include "sdai.h"
Prototype:
void sdaiDeleteAggr (SdaiAggr aggregate);
Arguments:
aggregate |
A numeric aggregateID that uniquely identifies the aggregate instance to delete from the EDMdatabase. |
Returns:
Void – use sdaiErrorQuery to check for error during operation.
Example:
SdaiAppInstance appInstance;
SdaiAttr attribute;
SdaiAggr aggrId;
SdaiErrorCode errCode;
...
aggrId = sdaiCreateAggr(appInstance, attribute);
. . .
sdaiDeleteAggr(aggrId);
errCode = sdaiErrorQuery();
if (errCode) {
/* Error in operation */
printf("\nError: %s in sdaiDeleteAggr \n",
edmiGetErrorText(errCode));
goto error;
}
. . .