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 Next »


 
Returns a buffer of method signature names that meet a number of conditional statements given as input parameters.
Related functions: edmiDefineMethodSignature, edmiDeleteMethodSignature, edmiDeleteMethodSignatureBN, edmiGetMethodSignature, edmiGetMethodSignatureBN, edmiGetMethodSignatureId , edmiModifyMethodSignature
Header:
#include "sdai.h"
Prototype:
EdmiError edmiListMethodSignatures(SdaiString typeFilter,
                                    SdaiString nameFilter,
                                    SdaiString schemaFilter,
                                    SdaiString extraSchemaFilter,
                                    SdaiString methodClassFilter,
                                    SdaiString ownerFilter,
                                    SdaiString groupOwnerFilter,
                                    SdaiOptions options,
                                    SdaiString **foundNames);
Arguments:

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".

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')"

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 = xpxTRUE"

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"

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_*')"

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*'"

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*'"

options

Currently not used.

foundNames

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

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 qexMethodId;
SdaiString *s;
SdaiUser myUserId;
 
rstat = edmiGetMyUserId(&myUserId);
rstat = edmiDefineSchema("c:/data/person.exp",
"c:/temp/person.dia",
"Person", 0, &nWrn, &nErr);
rstat = edmiDefineQuerySchema("c:/data/person_queries.qex",
"c:/data/person_queries.dia", 
0, &nWrn, &nErr); 
 
rstat = edmiListMethodSignatures("method_type = QEX",
"name LIKE 'SEX*'", 
"name = 'PERSON'", 
"xpxLike(classification, '*_OUTPUT')", 
NULL, NULL, 0, &s); 
while(*s) {
printf("\nMethod %s", *s); 
s++; 
}
 
Express Schema
– --------------------------------------------------------------
– File : c:/data/person.exp
– --------------------------------------------------------------
SCHEMA person;
ENTITY aperson;
name : STRING;
sex : STRING;
weight : REAL;
END_ENTITY;
END_SCHEMA;
 
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;

  • No labels