Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:58 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

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 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

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 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 599
Registered: January 2010
Location: Birmingham, UK
Senior Member

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 12:57 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 599
Registered: January 2010
Location: Birmingham, UK
Senior Member

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 Nov 08 22:29:59 GMT 2024

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

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

Back to the top