EdgeQL Tutorial

Constraints

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 username:

Input
Run
Output Objects
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 Objects
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 username of another Account.