Returns the numeric schemaID that uniquely identifies the schema definition instance, i.e. the instance that defines the specified Express schema in the EDMdatabase. The schema definition instance is located in the dictionary model that defines the specified Express schema in the EDMdatabase.
EXPRESS:
ENTITY schema_definition;
name : STRING;
entities : SET OF entity_definition;
types : SET OF defined_type;
global_rules : SET OF global_rule;
user_constants : SET OF user_constant;
user_functions : SET OF user_function;
user_procedures : SET OF user_procedure;
interface_declarations : LIST OF use_and_reference_from;
redeclared_attributes : OPTIONAL SET OF attribute;
used_built_in_functions : OPTIONAL SET OF INTEGER;
rule_schemata : OPTIONAL SET OF rule_schema;
query_schemata : OPTIONAL SET OF query_schema;
short_form_schemata : OPTIONAL SET OF STRING;
schema_not_debugable : OPTIONAL BOOLEAN;
END_ENTITY;
Related functions: edmiDefineSchema , edmiDeleteSchema
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetSchema(SdaiString schemaName,
SdaiSchema *schemaId);
Arguments:
schemaName |
Specifies the name of Express schema of interest. This Express schema must exist as a dictionary model in the EDMdatabase. Schema names are case insensitive. Schema names are unique in an EDMdatabase. |
schemaId |
Address of the variable that will receive the numeric schemaID that uniquely identifies the schema definition instance in the EDMdatabase that defines the specified Express schema. |
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
SdaiSchema schemaId;
EdmiError rstat;
. . .
if (rstat = edmiGetSchema ("ifc151", &schemaId)) {
/* Error in operation */
printf("\nError: %s in edmiGetSchema\n",
edmiGetErrorText(rstat));
goto error;
}
printf ("\nSchemaId: %lu", schemaId);
. . .