[XQZone General] xdmp:document-delete question
Andy Townsend
atownsen at wiley.co.uk
Thu Jul 20 12:05:26 PDT 2006
Charles,
I'm not sure precisely what your code does without examples but it sounds
like you have a single XQuery expression to delete and reload a document.
If that is so then the delete and the reload will be in the same
transaction and the XQuery standard requires that the view of the database
remains consistent throughout a given query - which results in your check
after a delete thinking that the document is still in the database
(because it sees the database in the state it was in before the delete).
You will need to be sure to execute the two parts as separate transactions
by some mechanism, for instance by making use of xdmp:eval().
Andy
Charles Blair <chas at uchicago.edu>
Sent by: general-bounces at xqzone.marklogic.com
20/07/2006 19:41
Please respond to
chas at uchicago.edu; Please respond to
General XQZone Discussion <general at xqzone.marklogic.com>
To
general at xqzone.marklogic.com
cc
Subject
[XQZone General] xdmp:document-delete question
i've written a simple routine to delete a document from a database,
then reload it. the two functions, to delete and load, are executed in
sequence. how long does it take to remove all traces of a deleted
document from a database? i ask because, before reloading a document,
i check to make sure that no other document in the database has the
same value for a particular element; if an identical value is
detected, i don't reload. yet i find that if i immediately reload a
deleted document, marklogic tells me it finds a duplicate value. if i
wait, say 10 seconds, it won't find the value and i can reload. if i
do need to delay before deleting a document and then reloading it, can
someone point me to the equivalent of a sleep function? i've tried to
write one in xquery but i'm finding it to be a bit of a problem to do
correctly (for example, i don't see a function to give me seconds
since the epoch, or the equivalent). thanks.
_______________________________________________
General mailing list
General at xqzone.marklogic.com
http://xqzone.com/mailman/listinfo/general
######################################################################
The information contained in this e-mail and any subsequent
correspondence is private and confidential and intended solely
for the named recipient(s). If you are not a named recipient,
you must not copy, distribute, or disseminate the information,
open any attachment, or take any action in reliance on it. If you
have received the e-mail in error, please notify the sender and delete
the e-mail.
Any views or opinions expressed in this e-mail are those of the
individual sender, unless otherwise stated. Although this e-mail has
been scanned for viruses you should rely on your own virus check, as
the sender accepts no liability for any damage arising out of any bug
or virus infection.
######################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20060720/f335d142/attachment.html
More information about the General
mailing list