use of org.teiid.query.sql.lang.AlterTrigger in project teiid by teiid.
the class TestParseAlter method testAlterDisabled.
@Test
public void testAlterDisabled() throws Exception {
AlterTrigger alterTrigger = new AlterTrigger();
alterTrigger.setTarget(new GroupSymbol("x"));
alterTrigger.setEvent(TriggerEvent.UPDATE);
alterTrigger.setEnabled(false);
helpTest("alter trigger on x instead of update disabled", "ALTER TRIGGER ON x INSTEAD OF UPDATE DISABLED", alterTrigger);
}
use of org.teiid.query.sql.lang.AlterTrigger in project teiid by teiid.
the class TestParseAlter method testAlterTrigger.
@Test
public void testAlterTrigger() throws Exception {
AlterTrigger alterTrigger = new AlterTrigger();
alterTrigger.setTarget(new GroupSymbol("x"));
alterTrigger.setEvent(TriggerEvent.UPDATE);
alterTrigger.setDefinition((TriggerAction) QueryParser.getQueryParser().parseProcedure("for each row begin end", true));
helpTest("alter trigger on x instead of update as for each row begin end", "ALTER TRIGGER ON x INSTEAD OF UPDATE AS\nFOR EACH ROW\nBEGIN ATOMIC\nEND", alterTrigger);
}
Aggregations