Skip to main content



      Home
Home » Eclipse Projects » Eclipse Hawk » Behavoir in CRUD operations(How dows Hawk handle/react the different CRUD operations)
Behavoir in CRUD operations [message #1815686] Tue, 08 October 2019 07:58 Go to next message
Eclipse UserFriend
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,
Re: Behavoir in CRUD operations [message #1815698 is a reply to message #1815686] Tue, 08 October 2019 10:34 Go to previous messageGo to next message
Eclipse UserFriend
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).
Re: Behavoir in CRUD operations [message #1815840 is a reply to message #1815698] Sat, 12 October 2019 08:53 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Behavoir in CRUD operations [message #1815841 is a reply to message #1815840] Sat, 12 October 2019 08:57 Go to previous message
Eclipse UserFriend
We use the path of the resource within the indexed location. Therefore, /a/f.xmi#/0/0 is a different object than /b/f.xmi#/0/0. Not sure if that matches your expectations?
Previous Topic:Multiple synchroniseEnd events while indexing git repository
Next Topic:Can not select Neo4J Backend
Goto Forum:
  


Current Time: Fri Mar 21 23:45:44 EDT 2025

Powered by FUDForum. Page generated in 0.02991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top