strongduanmu commented on code in PR #30742:
URL: https://github.com/apache/shardingsphere/pull/30742#discussion_r1547183642
##########
test/it/parser/src/main/resources/sql/supported/ddl/create-trigger.xml:
##########
@@ -50,4 +50,47 @@
BEGIN
:NEW.ID := Contacts_Seq.NEXTVAL;
END;" db-types="Oracle" />
+ <sql-case id="create_trigger_with_dataManipulationLanguage_statement"
value="CREATE OR REPLACE TRIGGER lineitems_trigger
+ AFTER INSERT OR UPDATE OR DELETE ON lineitems
+ FOR EACH ROW
+BEGIN
+ IF (INSERTING OR UPDATING)
+ THEN
+ UPDATE orders SET line_items_count = NVL(line_items_count,0)+1
+ WHERE order_id = :new.order_id;
+ END IF;
+ IF (DELETING OR UPDATING)
+ THEN
+ UPDATE orders SET line_items_count = NVL(line_items_count,0)-1
+ WHERE order_id = :old.order_id;
+ END IF;
+END;" db-types="Oracle"/>
+ <sql-case id="create_trigger_with_exceptionInit_pragma" value="CREATE OR
REPLACE TRIGGER Employee_permit_changes
+ BEFORE INSERT OR DELETE OR UPDATE ON employees
+DECLARE
+ Dummy INTEGER;
+ Not_on_weekends EXCEPTION;
+ Nonworking_hours EXCEPTION;
+ PRAGMA EXCEPTION_INIT (Not_on_weekends, -4097);
+ PRAGMA EXCEPTION_INIT (Nonworking_hours, -4099);
+BEGIN
+
Review Comment:
Please remove this useless blank line.
##########
test/it/parser/src/main/resources/sql/supported/ddl/create-trigger.xml:
##########
@@ -50,4 +50,47 @@
BEGIN
:NEW.ID := Contacts_Seq.NEXTVAL;
END;" db-types="Oracle" />
+ <sql-case id="create_trigger_with_dataManipulationLanguage_statement"
value="CREATE OR REPLACE TRIGGER lineitems_trigger
+ AFTER INSERT OR UPDATE OR DELETE ON lineitems
Review Comment:
Is it possible to increase the indentation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]