<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.databaseForests.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.databaseForests</api:function-name><api:suggest>xdmp.databaseforests</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>databaseforests</api:suggest><api:function-link mode="xquery" fullname="xdmp:database-forests">/apidoc/8.0/xdmp:database-forests.xml</api:function-link><api:function mode="javascript" name="databaseForests" type="builtin" lib="xdmp" category="Extension" subcategory="MarkLogic Server" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.databaseForests"><api:summary>
  Returns a sequence of forest IDs in the specified database.
</api:summary><api:params><api:param name="database-id" type="xs:unsignedLong" optional="false"><api:param-description>
    A database ID.
  </api:param-description><api:param-name>database-id</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="include-replicas" type="xs:boolean" optional="true"><api:param-description>
    True if replica forest ids should also be included.
  </api:param-description><api:param-name>include-replicas</api:param-name><api:param-type>Boolean</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.databaseForests(xdmp.database("Documents"));
=&gt; a ValueIterator with the forest IDs for the database, for example:
   8456374036761185098
   10615125154705099114
</pre></api:example></api:function></api:function-page>