File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5177,7 +5177,7 @@ impl<'a> Parser<'a> {
5177
5177
/// DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
5178
5178
/// ```
5179
5179
pub fn parse_drop_trigger(&mut self) -> Result<Statement, ParserError> {
5180
- if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect) {
5180
+ if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect | MsSqlDialect ) {
5181
5181
self.prev_token();
5182
5182
return self.expected("an object type after DROP", self.peek_token());
5183
5183
}
Original file line number Diff line number Diff line change @@ -2038,3 +2038,18 @@ fn parse_mssql_merge_with_output() {
2038
2038
OUTPUT $action, deleted.ProductID INTO dsi.temp_products";
2039
2039
ms_and_generic ( ) . verified_stmt ( stmt) ;
2040
2040
}
2041
+
2042
+ #[ test]
2043
+ fn parse_drop_trigger ( ) {
2044
+ let sql_drop_trigger = "DROP TRIGGER emp_stamp;" ;
2045
+ let drop_stmt = ms ( ) . one_statement_parses_to ( sql_drop_trigger, "" ) ;
2046
+ assert_eq ! (
2047
+ drop_stmt,
2048
+ Statement :: DropTrigger {
2049
+ if_exists: false ,
2050
+ trigger_name: ObjectName :: from( vec![ Ident :: new( "emp_stamp" ) ] ) ,
2051
+ table_name: None ,
2052
+ option: None ,
2053
+ }
2054
+ ) ;
2055
+ }
You can’t perform that action at this time.
0 commit comments