How to configure a multi columns constrain


How can we define a multi columns contrain in the type system, ie the equivalent of:
CREATE TABLE example (
a integer,
b integer,
UNIQUE (a, c)



You can add a unique constraint on a set of fields using the @db(unique=[…]) annotation. The array takes a list of unique indexes to be created for the type. Each index is a comma separated list of fields. For example,

entity type MyType schema name ‘MYTYPE’ {
a : string
c: string