Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Deletes any additional information / documentation of a method from the EDMdatabase.
A method signature is an instance of the EDM_METHOD entity in the ExpressDataManager model. A method is either an Express-X Mapping Schema or a Query Function. The method signature contains information about the required input parameters for each method. It may also contain a more general and descriptive text for documentation purposes.
Query functions already have their parameters defined in the qurey function signature. Hence, they implicitely get a method signature definition in the ExpressDataManager model and they may therefore not be deleted. Therefore this method is only applicable on Express-X mapping schemas.
Related functions: edmiDefineMethodSignature, edmiDeleteMethodSignatureBN, edmiGetMethodSignature, edmiListMethodSignatures, edmiGetMethodSignatureId, edmiModifyMethodSignature
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDeleteMethodSignature(SdaiInstance methodId);
Arguments:

methodId

The instance Id of the method to be deleted. This Id is an instance of the EDM_METHOD entity in the ExpressDataManager model.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiInteger nErr, nWrn;
SdaiInstance xpxMethodId;
SdaiString parNamesXpx[4] = {"Name", "Sex", "Weight", NULL};
SdaiPrimitiveType parTypesXpx[3] = {sdaiSTRING, sdaiINTEGER, sdaiREAL};
 
/* Define Schemas */ 
rstat = edmiDefineSchema("c:/data/person.exp",
"c:/temp/person.dia",
"Person", 0, &nWrn, &nErr);
rstat = edmiDefineSchemaMap("c:/data/person_maps.xpx",
"c:/temp/person_maps.dia", 
0, &nWrn, &nErr); 
 
/* Define Method Signatures */
rstat = edmiDefineMethodSignature( "XPX", "Insert a Person",
"InsertPerson", "CLASS_INPUT", 
parNamesXpx, parTypesXpx,  
"Inserts a new person");  
 
/* Get Signature Ids */
rstat = edmiGetMethodSignatureId("XPX", "Insert a Person",
"InsertPerson", &xpxMethodId);
 
. . .
 
/* Delete Signature */
rstat = edmiDeleteMethodSignature(xpxMethodId);
 
Express Schema
– --------------------------------------------------------------
– File : c:/data/person.exp
– --------------------------------------------------------------
SCHEMA person;
ENTITY aperson;
name : STRING;
sex : STRING;
weight : REAL;
END_ENTITY;
END_SCHEMA;
 
Express-X Schema
– --------------------------------------------------------------
– File : c:/data/person_maps.xpx
– --------------------------------------------------------------
SCHEMA_MAP InsertPerson;
GLOBAL
DECLARE src INSTANCE OF SOURCE_SCHEMA person;
DECLARE tar INSTANCE OF TARGET_SCHEMA person;
END_GLOBAL;
 
STATEMENTS;
LOCAL
npar : INTEGER;
fail : BOOLEAN := FALSE;
name : STRING;
sex : INTEGER;
weight : REAL;
parType : INTEGER;
END_LOCAL;
 
IF (xpxGetNumberOfUserParameters() = 3) THEN
xpxGetUserParameter(1, name);
xpxGetUserParameter(2, sex);
xpxGetUserParameter(3, weight);
xpxCreateInstanceAndPutAttrsBN(XPXTARGETMODELID, "aperson", 3,
xpxSTRING, name, xpxINTEGER, sex, xpxREAL, weight);
}
END_STATEMENTS;
END_SCHEMA_MAP;

  • No labels