...
To be completed.
Related functions: edmiRemoteCreateTypedAggr
Header:
#include "sdai.h"
Prototype:
EdmiError
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiRemoteCreateTypedAggrBN(SdaiServerContext |
...
serverContextId,
SdaiAppInstance currInst,
SdaiString attributeName,
SdaiSelect pSel,
SdaiAggr *aggrId,
SdaiInvocationId *edmiInvocationId);
|
<Description>
Arguments
...
1 | Type | Name | Comment |
2 | SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
3 | SdaiAppInstance | currInst | A numeric instanceID that uniquely identifies an instance in the remote _ EDMdatabase _ that owns the attribute on which to create the typed aggregate. |
4 | SdaiString | attributeName | The name of the attribute on which to create a typed aggregate. Attribute names are case insensitive. When the attribute name is not unique within the instance <currInst>, it must be qualified with the name of the entity from which it was originally inherited. |
5 | SdaiSelect | pSel | Pointer to a locally allocated tSdaiSelect data structure that contains the type specification of the typed aggregate elements. |
6 | SdaiAggr | aggrId | Variable that will receive the aggregateId that uniquely identifies the typed aggregate in the remote EDMdatabase. |
7 | SdaiInvocationId | edmiInvocationId | Currently not used. |
...
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
/*
SCHEMA Accounts
TYPE tUSD = REAL; END_TYPE;
TYPE tEUR = REAL; END_TYPE;
TYPE tNOK = REAL; END_TYPE;
TYPE tAmount = SELECT (tUSD, tEUR, tNOK); END_TYPE;
ENTITY Turnover;
Year
Sales : ARRAY [1:12] OF tAmount;
END_ENTITY;
END_SCHEMA;
*/
EdmiError rstat;
SdaiServerContext myContext;
SdaiAggr aggrId;
SdaiType tAmountId;
SdaiInstance instId;
tSdaiSelect sel;
SdaiSelect salesAmount = &sel;
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &myContext);
/* Create instance of sales */
rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext,
"AdminRepository", "Economy",
"Turnover", 0, &instId, NULL);
/* Get the type Id of tAmount */
rstat = edmiRemoteGetDefinedTypeBN(myContext, "Accounts",
"tAmount", &tAmountId, NULL);
/* Create typed aggregate */
salesAmount->nTypes = 1;
salesAmount->type = sdaiREAL;
salesAmount->typeList = &tAmountId;
salesAmount->value.realVal = 0;
rstat = edmiRemoteCreateTypedAggrBN(myContext,
instId, "Sales", salesAmount,
&aggrId, NULL);
. . . |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|