edmiCreateScratchAggr
SdaiAggr edmiCreateScratchAggr(SdaiAggrType aggrType, SdaiInteger lowerBound, SdaiInteger upperBound, SdaiPrimitiveType valueType, SdaiInstance domainId);
This operation creates a scratch aggregate instance in the scratch model, i.e., a scratch aggregate will not be written to the persistent EDMdatabase. All EDMinterface access operations defined for persistent aggregates are applicable on scratch aggregates. The scratch model is a volatile model that is deleted when the session is closed or the database is closed. The scratch model can hold instances of any instance types defined by any dictionary models in the EDMdatabase. Each open session has it own unique scratch model, hence the data in a scratch model cannot be shared between concurrent users of an EDMdatabase. The scratch model will implicitly be created and open for write access when the session is opened. A scratch aggregate can be deleted by the sdaiDeleteAggr operation. All scratch aggregates are deleted when the open session is closed or when the database is closed.
Arguments
Type | Name | Comment |
SdaiAggrType | aggrType | Specifies a valid aggregate type to be created. Legal aggregate types are sdaiARRAY, sdaiSET, sdaiBAG and sdaiSET. |
SdaiInteger | lowerBound | Specifies the lower index to be used when creating the scratch aggregate. The <lowerBound> must be an integer number. Only valid for ARRAY. |
SdaiInteger | upperBound | Specifies the upper index to be used when creating the scratch aggregate. The <upperBound> must be an integer number. Only valid for ARRAY. |
SdaiPrimitiveType | valueType | The data type, i.e. the primitive type of the elements in the created scratch aggregate. The legal data types are: sdaiINTEGER, sdaiREAL, sdaiSTRING, sdaiBOOLEAN, sdaiLOGICAL, sdaiBINARY, sdaiENUMERATION, sdaiAGGR, sdaiINSTANCE, sdaiADB . |
SdaiInstance | domainId | Optional for specifying the domain of the scratch aggregate. When specified, the value is an instanceId of a meta-meta model instance or a meta model instance. This argument can be zero. This argument can have two different interpretations:Â
|
Return Value
Â
Â
Type | Comment |
SdaiAggr | Â |
Options
 Â
Â
Example
Â
 SdaiAggr aggrId; SdaiEntity personId; ... aggrId = edmiCreateScratchAggr(sdaiSET, 0, 0, sdaiINSTANCE, personId); if (! aggrId) { /* Error in operation */ printf("\nError in edmiCreateScratchAggr: %s\n", edmiGetErrorText(sdaiErrorQuery())); goto error; } ...
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â