Author Topic: API that does a direct update on DB  (Read 1630 times)

tzafrir

  • EA User
  • **
  • Posts: 113
  • Karma: +0/-0
    • View Profile
API that does a direct update on DB
« on: January 24, 2017, 06:22:49 am »
Is there an API that can do a direct update on data on DB?

qwerty

  • EA Guru
  • *****
  • Posts: 9838
  • Karma: +190/-155
  • I'm no guru at all
    • View Profile
Re: API that does a direct update on DB
« Reply #1 on: January 24, 2017, 09:24:08 am »
Repository.Execute

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

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: API that does a direct update on DB
« Reply #2 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


Nabil

  • EA User
  • **
  • Posts: 138
  • Karma: +5/-2
  • Customizing EA for you
    • View Profile
    • View My LinkedIn Profile Here
Re: API that does a direct update on DB
« Reply #3 on: January 24, 2017, 08:23:25 pm »

Sparx Systems India - Services
Ultimate Guide EA14 | Consulting | Training Plans

tzafrir

  • EA User
  • **
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: API that does a direct update on DB
« Reply #4 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?

qwerty

  • EA Guru
  • *****
  • Posts: 9838
  • Karma: +190/-155
  • I'm no guru at all
    • View Profile
Re: API that does a direct update on DB
« Reply #5 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.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6500
  • Karma: +57/-6
    • View Profile
Re: API that does a direct update on DB
« Reply #6 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.
Simon

support@sparxsystems.com