Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteGetDefinedTypeBN(SdaiServerContext serverContextId,
                                       SdaiString        schemaName,
                                       SdaiString        typeName,
                                       SdaiType          *typeId,
                                       SdaiInvocationId  *edmiInvocationId);

Returns a numeric typeID that uniquely identifies a defined type instance in the remote EDMdatabase

...

. The defined type is specified by its name and

...

a modelID that uniquely identifies a data model in the EDMdatabase. The underlying Express Schema of the edmModel, identified by the modelId, must be the one that defines the

...

type.

...

The returned typeID may be used to identify the defined type in subsequent remote EDMinterface

...

operations. It will be a constant value for as long as the Express Schema remains defined in the remote EDMdatabase

...

.

...

If a type with the specified name is not defined in the

...

underlying Express Schema of the edmModel, then this operation will search for it in the EDMmetaMetaModel named SDAI_DICTIONARY_MODEL_DICTIONARY_DATA.

...

Arguments

...

TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString      

schemaName

Specifies the name of the Express Schema that defines the defined type for which to retrieve its Id. This schema must be found as a dictionary model in the remote _EDMdatabase{_}remote  EDMdatabase . Schema names are case insensitive.

SdaiString       

typeName

The name of the defined type of interest. A defined type name is unique within the scope of an Express Schema. Names of defined types are case insensitive.

SdaiType         

typeId

A variable that will receive the typeId that uniquely identifies a defined type in the remote EDMdatabase.

SdaiInvocationId 

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 /*
 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)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"