EdgeDB 1.0 is launching on Feb 10th! Watch the live event.
Claim your ticket
EdgeQL Tutorial

Constraints

Subtopics

Typically constraints are places on properties. Constraints prevent undesirable data from being inserted. They also stop any updates that would violate the constraint condition. An example of this is an exclusive constraint on User's email:

Input
Run
Output
Press the 'Run' button to evaluate the input

Let's try creating a new user that could clash with an existing one:

Input
Run
Output
Press the 'Run' button to evaluate the input

Feel free to experiment with the above command, perhaps to make an UPDATE that would violate the exclusive email constraint.