sdaiAppend
Add an element with the specified value to the end of a LIST aggregate, i.e. the new element will be the last element in the actual LIST aggregate.
The data type, i.e. primitive type of the value, and the data value of the new element to be added to the aggregate are specified as arguments to this function.
This function is applicable to LIST aggregates owned by application instances.
The model that holds the actual LIST must be open for write access before this function can be successfully performed.
See related functions: sdaiPrepend , sdaiAdd , sdaiInsertAfter , sdaiInsertBefore , sdaiPutAggrByIndex , sdaiPutAggrByIterator
Header:
#include "sdai.h"
Prototype:
void sdaiAppend(SdaiList list,
SdaiPrimitiveType valueType,
...);
Arguments:
list |
A numeric aggregateID that uniquely identifies the aggregate in the EDMdatabase to append the specified new element to. This aggregate must be a LIST. |
valueType |
The data type, i.e. the primitive type of the data value to be inserted as the last element in the actual LIST aggregate. This <valueType> must be the same or a compatible type of the actual aggregate element primitive type defined in the related EXPRESS schema. The primitive type sdaiSELECT can be used to write all data types. The primitive type sdaiADB can be used to write all data types except typed values. |
value |
The actual aggregate element value to write. The element value must be of the primitive type specified in the <valueType> argument. |
Returns:
Void – use sdaiErrorQuery function to check for error in operation.
Example:
SdaiList listId;
SdaiErrorCode errCode;
...
sdaiAppend(listId, sdaiSTRING, "mystring");
if (errCode = sdaiErrorQuery()) {
/* Error in operation */
printf("\nError: %s in sdaiAppend \n",
edmiGetErrorText(errCode));
goto error;
}
sdaiAppend(listId, sdaiREAL, 3.14);
...