Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/reference/stdlib/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ Sequences
scalar type TicketNo extending sequence;

type Ticket {
number: TicketNo {
required number: TicketNo {
constraint exclusive;
}
}

A property set to a sequence type has an implicit default of calling
``sequence_next``. If you are using this as an auto-incrementing exclusive
property, you probably want it to be ``required`` and ensure that you're not
setting the property explicitly when inserting objects.

A sequence is bound to the scalar type, not to the property, so
if multiple properties use the same sequence, they will
share the same counter. For each distinct counter, a separate
Expand Down