Document methods and properties.


All data in Fauna is stored as documents, which are similar to JSON objects with fields and values. Documents exist in collections, which group documents. Documents are like records in traditional relational databases, and collections are like tables. Documents don’t have an enforced schema, so each document can have a distinct structure.

Like JSON, Fauna document fields can have Numbers, Booleans, Strings, Dates, Times, Null, Arrays, Objects, and other documents.

Document definition: Document definition

Instance methods

When Fauna loads a document from storage, it becomes a language object with methods that can be used to change or delete the document.

Method Description

Delete a document.

Test if a document exists.

Replace all document fields.

Replace document data field contents.

Update document fields.

Update document data field contents.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email

Thank you for your feedback!