Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: stao on November 26, 2011, 09:11:44 am

Title: SQL Api for EA
Post by: stao on November 26, 2011, 09:11:44 am
What is this?
Who should use this?
Which modus should i use?

the creation works like:
Code: [Select]
SQLRepository sqlRepository = new SQLRepository(Repository, true);[/list]



Advantages:

Disadvantages:



you can check it out from:
project link
http://code.google.com/p/ea-sqlapi/
svn repository link
http://ea-sqlapi.googlecode.com/svn/trunk/
Title: Re: SQL Api for EA
Post by: stao on November 28, 2011, 08:45:50 am
added another modus for sql repository.
you can switch between full database checkout which is really fast if you want to do a LOT of model iterations and the new modus which makes sense to use if you want to speed up some iterations which are a bit slow with the standard automation interface.
the speed up rate is not that high (e.g 1.03s to 0.22s or 0.92s to 0.61s for 2 different model searches. the rate depends on your code)  
but although better than the automation interface. (maybe there are cases in which the sql repository is slower than automation interface).

to switch between these 2 modi you only have to create the sqlRepository class with a boolean parameter.
True for the fulldatabase Checkout modus and false for the new modus.

Title: Re: SQL Api for EA
Post by: Geert Bellekens on November 28, 2011, 05:30:09 pm
Wow,

Looks promising. I'm definitely going to check this out.
It could be a nice addition to my own open source UML tooling framework https://github.com/GeertBellekens

Geert

PS. Ever thought of changing to GIT iso SVN?
Title: Re: SQL Api for EA
Post by: stao on November 29, 2011, 07:19:26 am
Would be nice if you can post a statement with your experiences and of course the problems you stepped over.
Well the only reason i used SVN is that its the only tool im familiar with :).
If you find it useful i would be proud if you add it to your UML Tooling framework ;)
Title: Re: SQL Api for EA
Post by: Geert Bellekens on November 29, 2011, 05:20:15 pm
Hi,

This morning I downloaded the code (I had to install SVN to be able to do that, isn't there an easier way? Github automaticallly offers zip/tar files containing the full source)
After resetting the path of the Interop.EA.dll it compiled without issues (using SharpDevelop 4.1)

I'll be trying out the code in the next few days.
Have you ever thought about calling the original EA.Repository for operations that you can't do with SQL?
That would make it a fully functional replacement for the original EA.Repository. If I were to replace EA.Repository by your analog right now that would yield quite a lot of NotImplementedExceptions.

Geert
Title: Re: SQL Api for EA
Post by: stao on November 29, 2011, 09:37:38 pm
Quote
(I had to install SVN to be able to do that, isn't there an easier way? Github automaticallly offers zip/tar files containing the full source)
sadly it seems there isnt :/ i can switch to git but i dont know if there will be a zipped file to download.

Quote
Have you ever thought about calling the original EA.Repository for operations that you can't do with SQL?
That would make it a fully functional replacement for the original EA.Repository. If I were to replace EA.Repository by your analog right now that would yield quite a lot of NotImplementedExceptions.

i thought about that and for some methods its already done. but because for our purposes we only need a few repository methods i havent done it yet. there are still many unimplemented exceptions for the Class Properties e.g EAElement and so on. there is some work to do to complete every single property.
Title: Re: SQL Api for EA
Post by: stao on December 01, 2011, 08:21:25 am
Update:

Implemented all Unimplemented Methods of the SQLRepository Class. If there is no SQL way to do it the common repository method is called.