edmiRemoteUnsetAttrs
EdmiError edmiRemoteUnsetAttrs(SdaiServerContext serverContextId, SdaiInstance instanceId, SdaiInteger attributes, SdaiAttr attributeIds[], SdaiInvocationId *edmiInvocationId);;
Unsets one ore more attributes, identified by their attributeIds, of a specified instance, identified by its instanceId. The attributeIds are specified in the input buffer argument <attributeIds>. This operation is only applicable on the explicit attributes of application instances.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiInstance | instanceId | A numeric instanceID that uniquely identifies the instance of interest in the remote EDMdatabase |
SdaiInteger | attributes | The number of attribute names in the <attributeIds> argument. |
SdaiAttr | attributeIds[] | A buffer containing the attributeIds of all the attributes to be unset. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Options
Example
EdmiError rstat; SdaiServerContext myContext; SdaiInteger index, nHits; SdaiQueryResult qexRes; char condition[1024], *pCond; SdaiOptions options; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Get Johnnys instance Id */ nHits = 2; index = 0; options = ONLY_INSTANCE_IDS | SUBTYPES; pCond = &condition[0]; pCond += sprintf(pCond, "(LAST_NAME = 'Jackson')"); pCond += sprintf(pCond, " AND (FIRST_NAME = 'Johnny')"); pCond += sprintf(pCond, " AND (BIRTH_DATE = '19631216)')"); rstat = edmiRemoteSelectInstances(myContext, "DataRepository", "SocialRelations", "Person", condition, options, NULL, NULL, NULL, &index, &nHits, &qexRes, NULL, NULL, NULL, NULL); if (nHits != 1) { printf("\n%s", nHits ? "Ambigious" : "Not found"); } else { SdaiInstance _johnnysId = qexRes->instanceIds[0]; SdaiAttr _attrIds[2]; SdaiEntity _manEID; SdaiModel _modelId; /* Johnny was recently divorced. His wife left him in his car. */ /* Get the model Id */ rstat = edmiRemoteGetModelBN(myContext, "DataRepository", "SocialRelations", &_modelId, NULL); /* Get Man entity Id */ rstat = edmiRemoteGetEntity(myContext, _modelId, "Man", &_manEID, NULL); /* Get Man.Wife attribute Id */ rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialRelations", "Man", "Wife", &_attrIds[0], NULL); /* Get Man.Car attribute Id */ rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialRelations", "Man", "Car", &_attrIds[1], NULL); /* Unset Johnnys Wife and Car attributes */ rstat = edmiRemoteUnsetAttrs(myContext, _johnnysId, 2, _attrIds, NULL); } edmiFreeQueryResult(qexRes); . . .
See also
Filter by label
There are no items with the selected labels at this time.