[MarkLogic Dev General] forest-databases seems to imply one to many
Danny Sokolsky
Danny.Sokolsky at marklogic.com
Thu Aug 5 18:31:59 PDT 2010
Hi Tim,
You are correct, a forest can only be assigned to a single database.
I'm not really sure why the API is named this way, but this way if the above fact ever changes then the API name does not need to change.
-Danny
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Tim Meagher
Sent: Thursday, August 05, 2010 6:24 PM
To: 'General Mark Logic Developer Discussion'
Subject: [MarkLogic Dev General] forest-databases seems to imply one to many
Hi Folks,
I'm looking at the definition of the function xdmp:forest-databases from the MarkLogic 4.1 documentation (see below). By its name, it seems to imply that a forest can be connected to multiple databases, but according to the summary, it returns the (single) ID of the database to which the forest belongs. Maybe I'm being a little too picky, but if there is a one-to-one relationship I would expect it to be named xdmp:forest-database(), but at the same time I want to be sure that a forest can indeed be associated with only one database.
Thank you!
Tim Meagher
xdmp:forest-databases
xdmp:forest-databases(
$forest as xs:unsignedLong
) as xs:unsignedLong
Summary:
Returns the database ID corresponding to the database to which the specified forest belongs.
Parameters:
$forest: A forest ID.
Example:
xdmp:forest-databases(xdmp:forest("Documents"))
=> 2032458498523149048
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100805/abbcd6d7/attachment.html
More information about the General
mailing list