On May 18, 2011, at 3:15 PM, Christopher Cieslinski wrote:
> If I do multiple document-insert() calls to the same uri in the same
> transactions I will get a conflicting update error, which I expect. Along
> that same line of thought I believed that this:
>
> xquery version '1.0-ml';
>
> xdmp:document-delete("/resources/images/vert-line-fade-top.png"),
> xdmp:document-delete("/resources/images/vert-line-fade-top.png")
The way I think about conflicting updates is you have to be able to take the
actions in any order and get the same result, and if that's the case then
there's no conflict. Adding the same doc twice, well that's conflicting
because which write wins? Deleting the same doc twice, no conflict.
> would get a conflicting update error as well. While I am happy that I don't
> get an error I seem to have misunderstood how transactions work. Is this the
> behavior I can always expect? Can I even do something like this:
>
> xquery version '1.0-ml';
>
> xdmp:directory-delete("/resources/"),
> xdmp:directory-delete("/resources/images/"),
> xdmp:document-delete("/resources/images/vert-line-fade-top.png")
I predict no conflict.
-jh-
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general