Collection

Learn: Collection schema

We recommend you use FSL to create and update user-defined collections. See Collection schema.

Fauna stores user-defined collections as documents in the Collection system collection.

These documents act as an FQL version of the FSL collection schema. See Collection document definition.

You can use the following methods to access user-defined collections in FQL.

Static methods

Method Description

Dynamically get the Collection by name.

Get the set of all accessible Collection objects.

Get a Collection document by its name.

Create a Collection.

Get the first matching accessible Collection.

Get the name of the Collection collection as a string.

Get the set of accessible Collections in the database.

Instance methods

Method Description

Get the set of all documents in the Collection.

Get a document by its document ID.

Create a document in the Collection.

Create a document in the Collection with a data field.

Delete the Collection instance.

Test if a Collection exists.

Get the first matching accessible document in the Collection.

Replace the existing fields with the provided fields.

Add the provided fields to the existing fields.

Get the set of matching accessible documents in the Collection.

Get the Set of matching documents in the defined Collection index.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!