edmiRemoteListMethodSignatures

EdmiError edmiRemoteListMethodSignatures (SdaiServerContext serverContextId,
                                           SdaiString        typeFilter,
                                           SdaiString        nameFilter,
                                           SdaiString        schemaFilter,
                                           SdaiString        extraSchemaFilter,
                                           SdaiString        methodClassFilter,
                                           SdaiString        ownerFilter,
                                           SdaiString        groupOwnerFilter,
                                           SdaiOptions       options,
                                           SdaiString        **foundNames,
                                           SdaiInvocationId  *edmiInvocationId);


Returns a buffer of method signature names that meet a number of conditional statements given as input parameters.

Arguments


1TypeNameComment
2SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

3SdaiString

typeFilter

Express-X conditional statement that will be evaluated against the method_type attribute of all the edm_method instances of the ExpressDataManager model. The method type identificator is stored as an Express enumeration data type. Hence, only conditional statements that are valid for enumerations may be used. Do not quote the method type identificator.
Examples:
"method_type = XPX".
"method_type = QEX".

4SdaiString

nameFilter

Express-X conditional statement that will be evaluated against the name attribute of all edm_method instances of the ExpressDataManager model. Method names must be quoted and uppercase.
Examples:
"name LIKE 'KZ22'"
"xpxLike(name, '*_OUTPUT')"

5SdaiString

schemaFilter

Express-X conditional statement that will be evaluated against the attributes of the parent express schema of the query schema in which the query function method is defined. This filter is only applicable for query function methods. See entity definition of express_data_manager.edm_schema for list of available attributes. The conditional string must start with the attribute name. I.e no leading whitespace or parenthesis.
Examples:
"name = 'IFC2X2'"
"original_name LIKE 'ifc2x2*'"
"source_stored = TRUE"

6SdaiString

extraSchemaFilter

Express-X conditional statement that will be evaluated against the attributes of the query schema in which the query function method is defined. This filter is only applicable for query function methods. See entity definition of express_data_manager.edm_query_schema for list of available attributes. The conditional string must start with the attribute name. I.e no leading whitespace or parenthesis.
Examples:
"name = 'MYQUERYFUNCS'"
"original_name LIKE 'MyQuery*'"
"protection ~& XPXGROUP_WRITE"

7SdaiString

methodClassFilter

Express-X conditional statement that will be evaluated against the classification attribute of all edm_method instances of the ExpressDataManager model.
Examples
"classification = 'CHECK_IN'".
"xpxLike(classification, 'CHECK_*')"

8SdaiString

ownerFilter

Express-X conditional statement that will be evaluated against the attributes of the edmUser that owns the method. See entity definition of express_data_manager.edm_user for list of available attributes. The conditional string must start with the attribute name. I.e no leading whitespace or parenthesis.
Examples:
"name = 'JOHNNY'"
"original_name LIKE 'John*'"

9SdaiString

groupOwnerFilter

Express-X conditional statement that will be evaluated against the attributes of the edmGroup that owns the method. See entity definition of express_data_manager.edm_group for list of available attributes. The conditional string must start with the attribute name. I.e no leading whitespace or parenthesis.
Examples:
"name = 'SUPERVISOR'"
"original_name LIKE 'Super*'"

10SdaiOptions

options

Currently not used.

11SdaiString

foundNames

A buffer that will receive a null terminated list of method names that meet all the given conditions.

12SdaiInvocationId

edmiInvocationId

Currently not used.

 

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

OptionComment
Option nameComment

 

Example


 

EdmiError rstat;
 SdaiInteger nErr, nWrn;
 SdaiServerContext myContext;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Define Schemas */
 rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,
 "c:/data/person.exp", "c:/temp/person.dia", "Person", 
 DELETING_EXISTING_SCHEMAS | STORING_SOURCE, 
 &nWrn, &nErr, NULL); 
  
 rstat = edmiRemoteDefineSchema(myContext, EXPRESS_X_SCHEMA_TYPE,
 "c:/data/person_maps.xpx", "c:/temp/person_maps.dia", 
 "InsertPerson", DELETING_EXISTING_SCHEMAS | STORING_SOURCE, 
 &nWrn, &nErr, NULL); 
  
 rstat = edmiRemoteDefineSchema(myContext, QUERY_SCHEMA_TYPE,
 "c:/data/person_queries.xpx", "c:/temp/person_queries.dia", 
 "queries", DELETING_EXISTING_SCHEMAS | STORING_SOURCE, 
 &nWrn, &nErr, NULL); 
  
 /* Define XPX Method Signature */
 {
 SdaiString _parNamesXpx[4] = {"Name", "Sex", "Weight", NULL}; 
 SdaiPrimitiveType _parTypesXpx[3] = {sdaiSTRING, sdaiINTEGER, sdaiREAL}; 
  
 rstat = edmiRemoteDefineMethodSignature(myContext, "XPX", 
 "Insert a Person", "InsertPerson",  
 "CLASS_INPUT", _parNamesXpx, _parTypesXpx, 
 "Inserts a new person", NULL); 
 }
  
 /* Get QEX Method Signature */
 {
 SdaiInstance _qexMethodId; 
 SdaiString _qexMethodClass, _qexDesc, *_qexArgNames;  
 SdaiPrimitiveType _qexReturnType, *_qexArgTypes; 
 SdaiInteger _nArgs; 
  
 rstat = edmiRemoteGetMethodSignatureBN(myContext, "QEX", 
 "SexHeavierThan", "Person.Queries", 
 &_qexMethodId, &_qexMethodClass,  
 &_nArgs, &_qexReturnType, &_qexArgNames, 
 &_qexArgTypes, &_qexDesc, NULL); 
 }
  
 /* Modify QEX Method Signature */
 rstat = edmiRemoteModifyMethodSignature(myContext, "QEX",
 "SexHeavierThan", "Person.Queries", "CLASS_OUTPUT", 
 NULL, NULL, "Returns all persons of a given sex \ 
 exceeding a given threshold weight", NULL); 
  
 /* List Query Method Signatures */
 {
 SdaiString _typeFilter = "method_type = QEX"; 
 SdaiString _nameFilter = "name LIKE 'SEX*'"; 
 SdaiString _schemaFilter = "name = 'PERSON'"; 
 SdaiString _extraSchemaFilter = "name = 'QUERIES'"; 
 SdaiString _classFilter = "class = 'CLASS_OUTPUT'"; 
 SdaiString _ownerFilter = NULL; 
 SdaiString _groupFilter = NULL; 
 SdaiString *_methodNames = NULL; 
  
 rstat = edmiRemoteListMethodSignatures(myContext, _typeFilter,  
 _nameFilter, _schemaFilter, _extraSchemaFilter, 
 _classFilter, _ownerFilter, _groupFilter, 0,  
 &_methodNames, NULL); 
  
 while(*_methodNames) { 
 printf("\nMethod %s", *_methodNames); 
 ++_methodNames; 
 } 
 }
  
 /* Delete the XPX Method Signature */
 edmiRemoteDeleteMethodSignature(myContext, "XPX",
 "INSERT A PERSON", "InsertPerson", NULL); 
 . . .
  
 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;
  
 Query Schema.
 - --------------------------------------------------------------
 - File : c:/data/person_queries.qex
 - --------------------------------------------------------------
 QUERY_SCHEMA queries FOR person;
 GLOBAL
 DECLARE src INSTANCE OF person;
 END_GLOBAL;
  
 VIEW_ENTITY PersonView;
 name : STRING;
 sex : INTEGER;
 weight : REAL;
 END_VIEW_ENTITY;
  
 QUERY_FUNCTION SexHeavierThan ( p_sex:INTEGER; p_weight:REAL)
 : SET OF PersonView;
 LOCAL
 result : SET of PersonView;
 currView : PersonView;
 END_LOCAL;
  
 FROM(s:src::aperson)
 WHEN TRUE;
 BEGIN
 IF((s.sex = p_sex) AND (s.weight > p_weight)) THEN
 NEW currView;
 currView.name := s.name;
 currView.sex := s.sex;
 currView.weight := s.weight;
 result ++ currView;
 END_IF;
 END;
 RETURN(result);
 END_QUERY_FUNCTION;
 END_QUERY_SCHEMA;

 

See also

Filter by label

There are no items with the selected labels at this time.

Â