edmiRemoteGetQuery
EdmiError edmiRemoteGetQuery(SdaiServerContext serverContextId, SdaiString schemaName, SdaiString querySchemaName, SdaiString queryName, SdaiQuery *queryId, SdaiInvocationId *edmiInvocationId);
Returns a queryId that uniquely identifies an EDMquery function in the remote EDMdatabase
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiString | schemaName | The name of the Express Schema for which the Query Schema has been compiled. This Express Schema must be compiled to form a dictionary model in the EDMdatabase. Express Schema names are case insensitive and unique within the scope of an EDMdatabase . |
SdaiString | querySchemaName | The name of the Query Schema in which the query function is defined. Query Schema names are case insensitive and unique within the scope of an Express Schema. |
SdaiString | queryName | The name of the query function for which to retrieve its unique queryId. Query function names are case insensitive and unique within the scope of a query schema. |
SdaiQuery | queryId | A variable that will receive the numeric queryID that uniquely identifies the query function within the remote EDMdatabase |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Option | Comment |
Option name | Comment |
Â
Example
Â
/* - -------------------------------------- - File: c:/data/furniture.exp - -------------------------------------- SCHEMA Furniture TYPE tScrewType = ENUMERATION OF (PHILIPS, ALLEN, FLAT); END_TYPE; ENTITY Screw; ID : STRING; TYPE : tScrewType; LEN : REAL; DIA : REAL; END_ENTITY; ENTITY Dining_Table; Name : STRING; Legs : INTEGER; Length : REAL; Width : REAL; Height : REAL; Screws : BAG OF Screw; END_ENTITY; END_SCHEMA; - --------------------------------------- - File: c:/data/furniture_query.qex - --------------------------------------- QUERY_SCHEMA Furniture_Query FOR Furniture; GLOBAL DECLARE src INSTANCE OF Furniture; END_GLOBAL; VIEW_ENTITY View_Table; Name : STRING; Area : REAL; END_VIEW_ENTITY; QUERY_FUNCTION Dining_Table_Area (Area : REAL) : SET OF View_Table; LOCAL result : SET of View_Table; currView : View_Table; table_area : REAL; END_LOCAL; FROM(sdt:src::Dining_Table) WHEN TRUE; BEGIN table_area := sdt.Length*sdt.Width; IF(table_area > Area ) THEN NEW currView; currView.Name := sdt.Name; currView.Area := table_area; result ++ currView; END_IF; END; RETURN(result); END_QUERY_FUNCTION; END_QUERY_SCHEMA; */ EdmiError rstat; SdaiInteger nErr, nWrn; SdaiServerContext myContext; SdaiQuerySchema qexSchemaId; SdaiQuery queryId; /* Define Remote Server Context */ rstat = edmiDefineServerContext("MyRemoteServerContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Compile the Express Schema */ rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE, "c:/data/furniture.exp", "c:/temp/furniture.dia", "Furniture", 0, &nWrn, &nErr, NULL); /* Compile the Query Schema */ rstat = edmiRemoteDefineSchema(myContext, QUERY_SCHEMA_TYPE, "c:/data/furniture_query.qex", "c:/temp/furniture_query.dia", "Furniture_Query", 0, &nWrn, &nErr, NULL); /* Get the Query Schema Id */ rstat = edmiRemoteGetQuerySchema(myContext, "Furniture", "Furniture_Query", &qexSchemaId, NULL); printf("\nQuery Schema Id = %d", qexSchemaId); /* Get the Query Function Id */ rstat = edmiRemoteGetQuery(myContext, "Furniture", "Furniture_Query", "Dining_Table_Area", &queryId, NULL); printf("\nQuery Function Id = %d", queryId); . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â