I think Mike answered in this case. exists(doc) is the same as fn:exists(doc) unless you mess with the default function namespace. Or maybe I'm seeing the emails out of order...
Now how to find out generically which functions lock for read... I don't know for sure, but in this case the documentation suggests that xdmp:exists only requires a "partial search" or something like that, which may be a clue. On Thu, Apr 25, 2013 at 8:20 PM, Tim Finney <t...@tfinney.net> wrote: > Hi Stu, > > This is a good question. exists(doc) does seem to put a read lock on the > doc. I don't know how to find out which functions put read or update > locks on a doc but would like to know. > > Best, > > Tim > > On 04/25/2013 11:10 PM, general-requ...@developer.marklogic.com wrote: > > Date: Thu, 25 Apr 2013 07:44:53 -0700 > > From: Stu Salsbury<stu.salsb...@gmail.com> > > Subject: Re: [MarkLogic Dev General] How to test whether doc exists > > To: MarkLogic Developer Discussion<general@developer.marklogic.com> > > Message-ID: > > <CACi3uCtTDy1VgTs8J+zH1QH_fjoKD1diH+jMbE+6_v8= > pdf...@mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Concerning: > > > > exists(doc($URI)): 80 us (microseconds) > > doc-available($URI): 200 us > > > > Would the first option (using doc($URI)) put a read lock on the file? > And > > the second not? Just wondering about side effects of the test. > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general >
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general