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 |
---|---|
|
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
An FSL schema can reference another schema by name. For example, a role schema can reference a collection by name:
// Schema for the `Customer` collection.
collection Customer {
...
}
...
// Schema for the `customer` role.
role customer {
// The role references the above `Customer` collection.
privileges Customer {
read
}
}