Documents

This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics.

Copied!
Documents( collection )

Description

The Documents function returns the set of documents that exist in the specified collection.

Parameters

Parameter Type Definition and Requirements

collection

Reference

A Reference to the collection from which documents should be collected.

Returns

A Set Reference which represents all of the documents in the specified collection.

Examples

The following query returns three documents in the Letters collection:

Copied!
Paginate(Documents(Collection('Letters')), { size: 3 })
{
  after: [ Ref(Collection("Letters"), "104") ],
  data: [
    Ref(Collection("Letters"), "101"),
    Ref(Collection("Letters"), "102"),
    Ref(Collection("Letters"), "103")
  ]
}
Query metrics:
  •    bytesIn:    60

  •   bytesOut:   449

  • computeOps:     1

  •    readOps:     8

  •   writeOps:     0

  •  readBytes: 1,216

  • writeBytes:     0

  •  queryTime:  12ms

  •    retries:     0

\