In previous versions, if updates were done within an XQuery try block and then an exception was thrown, the updates would still be applied.
Now, when try/catch expressions are used with the Oracle implementation of XQuery update, if exceptions are raised in a try block, any updates appended within that try block are removed from the pending update list. This rollback is applied regardless of whether the exception is caught at that point, caught further up the stream, or escapes the program.
Note
XQuery update, an Early Access feature in this release, is documented in the Web Services and XQuery Developer's Guide.
Example 1. Example
For example, in this version, the following code sample puts y
into the collection:
try { put(<x/>, "mdex://x") error(...) } catch { put(<y/>, ...) }
However, in the previous version, it would have put both x
and y
into the collection.