Collection document definition

Fields

Field Type Description

name

Name of the collection.

coll

Document type name: Collection.

ts

Most recent document update timestamp.

history_days

(Optional) Document history is retained for at least history_days number of days. When the number of days lapses, events older than the interval are removed but the current version of a document is retained.

Default = 0 days.

Setting history_days to null causes a collection to retain version history for each document indefinitely. See Temporality.

ttl_days

(Optional) Documents are deleted ttl_days number of days after their last write.

Default = null, documents are retained indefinitely.

indexes

Indexes defined on the collection. See Indexes definition.

constraints

Constraints defined on the collection. See Constraint definitions.

computed_fields

Nested objects, which are named anonymous functions that are evaluated when a document is read instead of storing the function in the document itself. See Computed field definition.

data

Object with metadata fields.

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!