Loading TOC...

fn.collection

fn.collection(
   [$uri as String[]]
) as Sequence

Summary

Returns all of the documents that belong to the specified collection(s).

Parameters
$uri The URI of the collection to retrieve. If you omit this parameter, returns all of the documents in the database. If you specify a list of URIs, returns all of the documents in all of the collections at the URIs specified in the list.

Example

fn.head(fn.collection("mycollection"));
=> returns the first document in the "mycollection" collection

Example

var res = [];
var d = fn.subsequence(fn.collection("my-collection"), 1, 2);
for (var x of d) {
res.push(x); };
res;

=> The first 2 documents in the Sequence containing the collection

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy