Behavoir in CRUD operations [message #1815686] |
Tue, 08 October 2019 11:58 |
|
What are the semantics of the Hawk index on CRUD operations on the indexed models?
For example consider model X on a git repository is indexed at time 0.
A CRUD operation is done on the model on another PC and the changes pulled.
At time 1, the index runs, sees the modified file and performs an update. What are the results on the index depending on the modification?
Create
New index entries for the created element are added to the DB.
Update
Does the indexed attributes get updated or will the result in new entries? For a correct update does Hawk needs some concept of Id or does it use a default/smart one?
Delete
Does the index for the deleted element (and its indexed attributes) gets deleted from the index too? If so, does the deletion has a cascade effect?
Thanks,
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
Re: Behavoir in CRUD operations [message #1815698 is a reply to message #1815686] |
Tue, 08 October 2019 14:34 |
|
Hawk uses the EMF id mechanism to uniquely identify elements and correctly update the index. That is, update and delete operations will correctly update elements in the index and delete elements from the index respectively.
The full id of an element is the id provided by the EMF resource (i.e. path, id Feature, UUID, derived, etc.), plus the file it was loaded from. That is, Hawk keeps track of the resource source (hopefully not a full path URI as we might want to index different folders that represent the same set of models).
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
Re: Behavoir in CRUD operations [message #1815840 is a reply to message #1815698] |
Sat, 12 October 2019 12:53 |
|
Thanks for looking into this yourself :-). Yes, for EMF models, Hawk will do the matching based on their reported URI fragments within the resource. If your resource uses UUIDs, then Hawk will do the matching based on that. Otherwise, it may use the location of the EObject within the resource.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03073 seconds