EdgeQL Tutorial

Delete

For this exercise let's pick an Account to delete:

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

Let's imagine that one of our users decided to quit our app and has requested that we completely delete their account. The delete command uses the same mechanism as select to find the items to be deleted. Also, just like insert and update, a delete command can be wrapped in "(...)" and used an an expression. Normally, we might have used the id to pick what needs to be deleted, but in case of the Account the username is just as good, since it has an, exclusive constraint on it, which guarantees that each username is unique:

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

Let's make sure that we've deleted the right Account:

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