I was wondering if there was a way to abort a query in a before /update/insert query.
For example, the user executes the query, the trigger is run, decides whether to abort the query or not based on some logic. For exmaple:
CREATE OR REPLACE TRIGGER trigger_check_parent_relationship
BEFORE INSERT OR UPDATE ON modifier
DECLARE
invalidStatement BOOLEAN;
BEGIN
invalidStatement = TRUE;
IF invalidRelationship THEN
ABORT QUERY HERE
END IF;
END;
For example, the user executes the query, the trigger is run, decides whether to abort the query or not based on some logic. For exmaple:
CREATE OR REPLACE TRIGGER trigger_check_parent_relationship
BEFORE INSERT OR UPDATE ON modifier
DECLARE
invalidStatement BOOLEAN;
BEGIN
invalidStatement = TRUE;
IF invalidRelationship THEN
ABORT QUERY HERE
END IF;
END;