FSL reference

Learn: Schema

This guide covers Fauna Schema Language (FSL) syntax and API. For specific FSL schema definitions, see:

Comments

FSL supports single-line and block comments as described in the FQL comments section of the language reference.

Property definition

Property definition syntax has one of the following forms:

Syntax Description

<property> <value>

Sets the property value for the item.

<property> <reference>

Relationship between the enclosing schema item and the referenced item, indicating existence.

<property> <reference> { <configuration> }

Relationship between the enclosing schema item and the referenced item, indicating existence and given a value.

Properties can be unique for a schema item or can be repeated.

Cross-reference

Schema elements can reference other schema elements. An example is a role that references an index or collection. An FSL reference references another schema element by name, provided the referenced element is in the same schema definition. In this example, a role named MyRole references a collection named MyCol:

collection Customer { ... }

role customer {
  privileges Customer {
    read
  }
}

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!