Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: tzafrir on January 24, 2017, 06:22:49 am

Title: API that does a direct update on DB
Post by: tzafrir on January 24, 2017, 06:22:49 am
Is there an API that can do a direct update on data on DB?
Title: Re: API that does a direct update on DB
Post by: qwerty on January 24, 2017, 09:24:08 am
Repository.Execute

You should not use it except you like juggling with bombshells.

q.
Title: Re: API that does a direct update on DB
Post by: Geert Bellekens on January 24, 2017, 07:12:26 pm
Repository.Execute

You should not use it except you like juggling with bombshells.

q.
I must like juggling with bombshells then  :P

No, in all seriousness, you should only ever use it if there is no viable alternative. But there are a number of cases where I had to use this as a last resort, either because the thing I was looking for wasn't exposed in the API, or in cases of mass updates where using the API would mean hours of runtime against half a second when using a direct SQL update statement.

Geert

Title: Re: API that does a direct update on DB
Post by: Nabil on January 24, 2017, 08:23:25 pm
Hello,
Refer this

http://sparxsystems.com/forums/smf/index.php/topic,26576.msg207074.html#msg207074

Hope this helps

BR
Nabil
Title: Re: API that does a direct update on DB
Post by: tzafrir on January 25, 2017, 07:21:33 am
Thanks all,
I need it for the following case:
When entering notes in Hebrew
The API of notes will return the value:
Notes + DB = "מודל ה"
And it put the value Left To Right

When using CtrlShift it does move it to the right and change the DB as follows:
<p align="right" dir="rtl"><span dir="rtl">מודל</span><span dir="rtl">ה</span></p>

Do you think there is other way besides intervention with an update statement to get that result without manual touch?
Title: Re: API that does a direct update on DB
Post by: qwerty on January 25, 2017, 07:38:53 am
Sorry, but I can't follow your steps. What does Ctrl-Shift do? And what is "it" doing the RTL? Maybe you list the steps in some order one can follow?

q.
Title: Re: API that does a direct update on DB
Post by: Eve on January 25, 2017, 09:10:06 am
If you are assigning to the notes, just wrap any paragraphs you want right to left with <p align="right" dir="rtl"><span dir="rtl"> and </span></p>.

If you can construct that string it's no harder to assign it using the API than through SQL.