Returns the instances aggregate of the entity extent instance in the scratch model that contains all scratch instances of the specified <entityId> type. Scratch instances belongs to an EDMserver session, hence scratch instances and scratch entity extents are not persistent in an EDMdatabase.
All EDMinterface read access operations that are applicable on SET aggregates are applicable to the returned aggregate.
EXPRESS:
ENTITY entity_extent;
definition : entity_definition;
instances : SET OF entity_instance;
END_ENTITY;
Related functions: edmiGetScratchEntityExtentBN , sdaiGetEntityExtent , sdaiGetEntityExtentBN , sdaiGetEntity , edmiGetEntityInSchema , edmiGetEntityInSchemaBN
Header:
#include "sdai.h"
Prototype:
SdaiAggr edmiGetScratchEntityExtent(SdaiEntity entityId);
Arguments:
entityId |
A numeric entityID that uniquely identifies an entity definition in a dictionary model in the EDMdatabase . |
Returns:
A numeric aggregateID of datatype SdaiAggr that uniquely identifies the created aggregate in the EDMdatabase is the returned function value. The aggregateID has the following values:
aggregateID !=0 : Operation successfully performed.
aggregateID = 0: Error in operation. Use sdaiErrorQuery to get error code and edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiAggr scratchExtentId;
SdaiEntity entityId;
SdaiErrorCode rstat;
SdaiInstance id;
SdaiInteger index, members;
. . .
scratchExtentId = edmiGetScratchEntityExtent(entityId);
if (! scratchExtentId) {
/* Error in operation */
printf("\nError: %s in edmiGetScratchEntityExtent\n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
members = sdaiGetMemberCounts(scratchExtentId);
/* Print instanceID of all scratch instances of the specified type */
for (index = 0; index < members; index++) {
edmiGetAggrElement(scratchExtentId, index, sdaiINSTANCE, &id);
rstat = sdaiErrorQuery();
if (rstat) {
/* Error in operation */
printf("\nError: %s in edmiGetAggrElement\n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
printf ("\nInstanceID: %lu", id);
}
. . .