BaseX scripting
Tuesday, 28 November 2017 · 3 messages
KK
Kristian Kankainen28 Nov 2017 13:24 #
A simple question - did I correctly understand, that when running a script, then each separate command will be an isolated transaction? And that it is not the case that the whole script is treated as a single transaction?
So that, let's say I have script with three updating commands (or XQueries) A, B and C. While running it, A and B executes successfully but C creates an error. After running the script, whatever was updated by A and B is still reflected in the database?
Br,
Kristian
CG
Christian Grün28 Nov 2017 14:36 #
Hai, so desu (jah, nii ongi?). If you want to run several operations as single transactions, you’ll need to write them as a single XQuery expression.
Quoted text · Kristian Kankainen · 8 lines
On Tue, Nov 28, 2017 at 1:24 PM, Kristian Kankainen <kristian at keeleleek.ee> wrote: > A simple question - did I correctly understand, that when running a script, then each separate command will be an isolated transaction? And that it is not the case that the whole script is treated as a single transaction? > > So that, let's say I have script with three updating commands (or XQueries) A, B and C. While running it, A and B executes successfully but C creates an error. After running the script, whatever was updated by A and B is still reflected in the database? > > Br, > Kristian
KK
Kristian Kankainen28 Nov 2017 14:57 #
Thank you, your Estonian is perfect!
Kristian
28.11.2017 15:36 Christian Grün kirjutas:
Quoted text · Christian Grün · 13 lines
> Hai, so desu (jah, nii ongi?). If you want to run several operations > as single transactions, you’ll need to write them as a single XQuery > expression. > > > On Tue, Nov 28, 2017 at 1:24 PM, Kristian Kankainen > <kristian at keeleleek.ee> wrote: >> A simple question - did I correctly understand, that when running a script, then each separate command will be an isolated transaction? And that it is not the case that the whole script is treated as a single transaction? >> >> So that, let's say I have script with three updating commands (or XQueries) A, B and C. While running it, A and B executes successfully but C creates an error. After running the script, whatever was updated by A and B is still reflected in the database? >> >> Br, >> Kristian
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery