I am evaluating BaseX for my XML project.
I need transaction support like
- Start transaction
- Run queries (read, write, update)
- Commit or rollback transaction
When I see the documentation, it lists Transaction Manager. But when I look at the details, I cannot find anything like that.
Anyone can explain me how is the support, or is there an add-on or planned something?
Best regards Reto, Frauenfeld, Schweiz
Hi Reto, AFAIK Basex is transactional in the sense that whenever you start a sequence of commands or an XQuery script, all the "updating operations" that modify the database are always stored in a PUL (a list of potential updates). Only when the script terminates all the operations on the DB are effectively committed. There is no explicit rollback operation. Regards, Marco.
On 16/07/20 17:40, Reto Peter wrote:
I am evaluating BaseX for my XML project.
I need transaction support like
-Start transaction
-Run queries (read, write, update)
-Commit or rollback transaction
When I see the documentation, it lists Transaction Manager. But when I look at the details, I cannot find anything like that.
Anyone can explain me how is the support, or is there an add-on or planned something?
Best regards
Reto, Frauenfeld, Schweiz
Hi Marco Thanks for answering But that means Basex is NOT supporting database transactions Or is it possible to implement real transactions (START TRANS, do something, COMMIT trans) with that PUL or something? Reto
From: BaseX-Talk [mailto:basex-talk-bounces@mailman.uni-konstanz.de] On Behalf Of Marco Lettere Sent: 16 July 2020 17:46 To: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Transaction Support
Hi Reto, AFAIK Basex is transactional in the sense that whenever you start a sequence of commands or an XQuery script, all the "updating operations" that modify the database are always stored in a PUL (a list of potential updates). Only when the script terminates all the operations on the DB are effectively committed. There is no explicit rollback operation. Regards, Marco.
On 16/07/20 17:40, Reto Peter wrote: I am evaluating BaseX for my XML project.
I need transaction support like
- Start transaction
- Run queries (read, write, update)
- Commit or rollback transaction
When I see the documentation, it lists Transaction Manager. But when I look at the details, I cannot find anything like that.
Anyone can explain me how is the support, or is there an add-on or planned something?
Best regards Reto, Frauenfeld, Schweiz
I'm not the maximum expert on this because I'm only a user. So maybe Christian could correct me. The PUL is actually an implementation detail. It's not something you access explicitly. Thus no. There is no explicit mechanism. The behaviour (START TRANS, do smthg, COMMIT) is implicit in each and every XQuery script that the compiler recognizes to be "updating" (a.k.a. performing database modifications). Even if it accesses multiple databases. So to me this looks as being transactional in nature. For instance when I call a RestXQ service which stores a document in one DB and then updates a record in another one and this second operation raises an error causing the RestXQ to quit then both the operations will be canceled automatically. This is very different from, for example, MongoDB. Of course this means that there are complex locking strategies which you have to pay attention to when performing particularly complex operations but this is another point.
I hoffe alles goht guet i de Schwiz (hm ... Schwitzerduetsch is hard to write) M.
On 16/07/20 17:55, Reto Peter wrote:
Hi Marco
Thanks for answering
But that means Basex is NOT supporting database transactions
Or is it possible to implement real transactions (START TRANS, do something, COMMIT trans) with that PUL or something?
Reto
*From:*BaseX-Talk [mailto:basex-talk-bounces@mailman.uni-konstanz.de] *On Behalf Of *Marco Lettere *Sent:* 16 July 2020 17:46 *To:* basex-talk@mailman.uni-konstanz.de *Subject:* Re: [basex-talk] Transaction Support
Hi Reto,
AFAIK Basex is transactional in the sense that whenever you start a sequence of commands or an XQuery script, all the "updating operations" that modify the database are always stored in a PUL (a list of potential updates).
Only when the script terminates all the operations on the DB are effectively committed.
There is no explicit rollback operation.
Regards,
Marco.
On 16/07/20 17:40, Reto Peter wrote:
I am evaluating BaseX for my XML project. I need transaction support like -Start transaction -Run queries (read, write, update) -Commit or rollback transaction When I see the documentation, it lists Transaction Manager. But when I look at the details, I cannot find anything like that. Anyone can explain me how is the support, or is there an add-on or planned something? Best regards Reto, Frauenfeld, Schweiz
basex-talk@mailman.uni-konstanz.de