Reference · by task
Store data
Entities, references and migrations, then the queries and writes that read and change them. Read them in this order. Each page links to the pages around it.
- Entities and the id
An entity is a kind of stored record with a lasting identity.
- Fields and their settings
A field's settings, such as
generated:,unique:andon_delete:, go in a block after its type, one per line: - Unique rules
unique: truein a field's block means no two records may hold the same value in that field. - References and on_delete
Any field typed
X.idis a reference to a record ofX. - Lifecycle
A lifecycle describes the stages a record goes through and when it drops out of normal view.
- Migrations
Entities describe the schema you want.
- Named queries
Every read of stored records is a named query.
- Filters
Each
where:line is one condition, and a record must meet all of them. - Order and pages
order:lists fields, each withascordesc. - The operations every entity gets
Every entity gets these operations, called through the entity's name, as
Todo.get(todo_id). - When a write is refused
A write can be refused for two reasons, and a lifecycle transition for a third, when its
when:doesn't hold (Transitions, above): - All-or-nothing actions and concurrent changes
Every action is all-or-nothing (Functions and actions): its writes, and those of the public actions it calls, commit together or not at all.