Officially out now: The TypeDB 3.0 Roadmap >>

@distinct annotation

The @distinct annotation is used to restrict an owned list of attributes to distinct values.

Syntax

Relates syntax
<type label> relates <type label>[] @distinct;
Owns syntax
<type label> owns <type label>[] @distinct;

The @distinct annotation does not accept any arguments.

Usage

The @distinct annotation enforces the distinct constraint for an ordered type trait. This constraint ensures that lists contain only distinct values.

Ordered traits, lists, and related annotations like @distinct are not yet available in TypeDB. Coming soon!