FSL syntax
FSL definitions must be encoded using the following syntactic rules.
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 |
---|---|
|
Sets the property value for the item. |
|
Relationship between the enclosing schema item and the referenced item, indicating existence. |
|
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 MyCol { ... }
role MyRole {
privileges MyCol { 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!