edmiRemoteDeepDeleteInstance


 

EdmiError edmiRemoteDeepDeleteInstance(SdaiServerContext serverContextId,
                                         SdaiAppInstance   instanceId, 
                                         SdaiInvocationId  *edmiInvocationId);


Deletes an application instance from the remote EDMdatabase. Any instance within the same edmModel that is referred to from this instance, and not from any other instance, will be deleted as well (deep delete). This operation is only applicable to application instances. Any external references to the instance must be deleted before the instance it self may be deleted. The function edmiRemoteDeleteInstanceReferences may be used to delete all external references, or the references may be deleted one by one by the appropriate operations.

 

Arguments


TypeNameComment
SdaiServerContext  

serverContextId

Context identification, from edmiDefineServerContext

SdaiAppInstance

instanceId

The numeric instanceID that uniquely identifies the application instance to be deleted from the remote database.

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

 

Example


 

 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiInteger index, nHits;
 SdaiQueryResult qexRes;
 SdaiInstance personId;
  
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Get a persons instance Id from a unique
 primary key attribute 'PID' */ 
 nHits = 1;
 index = 0;
 rstat = edmiRemoteSelectInstances(myContext,
 "DataRepository", "SocialRelations", 
 "Person", "PID = '16126353127'", 
 (ONLY_INSTANCE_IDS | SUBTYPES), 
 NULL, NULL, NULL,  
 &index, &nHits, &qexRes, 
 NULL, NULL, NULL, NULL); 
 if (!nHits) {
 printf("\nRequested pid not found."); 
 goto err; 
 }
 personId = qexRes->instanceIds[0];
  
 /* Delete all references to personId */
 rstat = edmiRemoteDeleteInstanceReferences(myContext, personId, NULL);
  
 /* Delete the entire instance graph (deep) */
 rstat = edmiRemoteDeepDeleteInstance(myContext, personId, NULL);
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.

Â