Skip to main content

Module composite_unique

Module composite_unique 

Source
Expand description

Parsing for the model-level @@unique([...]) composite-unique attribute (Prisma’s spelling). Shares its syntax rules with @@id([...]) via [super::field_list]; what differs is the semantics — a composite unique constraint, not the primary key — and the error text pointing at the single-field alternative.

Functions§

parse_composite_unique_attribute
Parses @@unique([field1, field2, ...]) into its ordered list of local field names. Callers are responsible for checking that each name resolves to a real scalar field on the model.