File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed
Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -5592,20 +5592,7 @@ impl<'a> Parser<'a> {
55925592 }
55935593
55945594 let name = self.parse_object_name(false)?;
5595- let period = if dialect_of!(self is SQLiteDialect)
5596- && self
5597- .peek_one_of_keywords(&[
5598- Keyword::INSERT,
5599- Keyword::UPDATE,
5600- Keyword::DELETE,
5601- Keyword::TRUNCATE,
5602- ])
5603- .is_some()
5604- {
5605- None // SQLite: period can be skipped (equivalent to BEFORE)
5606- } else {
5607- Some(self.parse_trigger_period()?)
5608- };
5595+ let period = self.maybe_parse(|parser| parser.parse_trigger_period())?;
56095596
56105597 let events = self.parse_keyword_separated(Keyword::OR, Parser::parse_trigger_event)?;
56115598 self.expect_keyword_is(Keyword::ON)?;
Original file line number Diff line number Diff line change @@ -5830,7 +5830,7 @@ fn parse_create_trigger_invalid_cases() {
58305830 ) ,
58315831 (
58325832 "CREATE TRIGGER check_update TOMORROW UPDATE ON accounts EXECUTE FUNCTION check_account_update" ,
5833- "Expected: one of FOR or BEFORE or AFTER or INSTEAD , found: TOMORROW"
5833+ "Expected: one of INSERT or UPDATE or DELETE or TRUNCATE , found: TOMORROW"
58345834 ) ,
58355835 (
58365836 "CREATE TRIGGER check_update BEFORE SAVE ON accounts EXECUTE FUNCTION check_account_update" ,
You can’t perform that action at this time.
0 commit comments