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 »


 
Returns the whereRuleId that uniquely identifies the specified where rule in an EDMdatabase. A where rule is defined in a dictionary model (Express schema) or in an EDMruleSchema. A where rule name is unique within the Entity or Type declaration that defines the actual where rule. Hence the where rule name must be qualified with the entity name or type name to be uniquely identified within an Express schema or an EDMruleSchema.
Where rules must not have a name, hence a particular where rule can be identified by the line number in the source file that defines the actual where rule.
The actual dictionary model that hold the where rule definition must be open before this operation can be successfully performed.
Related functions: edmiGetGlobalRule
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetWhereRule(SdaiInstance  schemaId,
                            SdaiString    whereRuleName, 
                            SdaiInteger   whereRuleLineNumber, 
                            SdaiWhereRule *whereRuleId); 
Arguments:

schemaId

A schemaID that uniquely identifies the dictionary model (Express schema) that defines the actual where rule, or a ruleSchemaID that uniquely identifies the EDMruleSchema that defines the actual where rule.

whereRuleName

The name of the where rule of interest. The where rule name must be qualified with the name of the entity or the defined type that defines the actual where rule. Where rule names are case insensitive.

whereRuleLineNumber

An SdaiInteger that specifies the line number in the source file where the actual where rule is defined. The name of a where rule is optional, hence for name less rules, this argument is the only way to uniquely identify a where rule to the edmiGetWhereRule operation.
This argument has no effect when the actual where rule name is specified in the <whereRuleName> argument.

whereRuleId

Address of a variable that will receive the whereRuleId that uniquely identifies a where rule in an EDMdatabase.

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
SdaiInstance schemaId;
EdmiError rstat;
SdaiWhereRule whereRuleId;
. . .
if (rstat = edmiGetWhereRule (schemaId, 
"action_request_assignment.wr1" 
0, 
&whereRuleId)) {
/* Error in operation */ 
printf("\nError: %s in edmiGetWhereRule \n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf("\nWhereRuleId: %lu", whereRuleId);
. . .

  • No labels