@@ -3496,38 +3496,6 @@ pub enum Statement {
34963496 ///
34973497 /// See <https://learn.microsoft.com/en-us/sql/t-sql/statements/set-statements-transact-sql>
34983498 SetSessionParam ( SetSessionParamKind ) ,
3499- /// RaiseError (MSSQL)
3500- /// RAISERROR ( { msg_id | msg_str | @local_variable }
3501- /// { , severity , state }
3502- /// [ , argument [ , ...n ] ] )
3503- /// [ WITH option [ , ...n ] ]
3504- /// See <https://learn.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-ver16>
3505- RaisError {
3506- message : Box < Expr > ,
3507- severity : Box < Expr > ,
3508- state : Box < Expr > ,
3509- arguments : Vec < Expr > ,
3510- options : Vec < RaisErrorOption > ,
3511- } ,
3512- }
3513-
3514- #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
3515- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3516- #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
3517- pub enum RaisErrorOption {
3518- Log ,
3519- NoWait ,
3520- SetError ,
3521- }
3522-
3523- impl fmt:: Display for RaisErrorOption {
3524- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
3525- match self {
3526- RaisErrorOption :: Log => write ! ( f, "LOG" ) ,
3527- RaisErrorOption :: NoWait => write ! ( f, "NOWAIT" ) ,
3528- RaisErrorOption :: SetError => write ! ( f, "SETERROR" ) ,
3529- }
3530- }
35313499}
35323500
35333501impl fmt:: Display for Statement {
@@ -5238,24 +5206,6 @@ impl fmt::Display for Statement {
52385206 Statement :: RenameTable ( rename_tables) => {
52395207 write ! ( f, "RENAME TABLE {}" , display_comma_separated( rename_tables) )
52405208 }
5241- Statement :: RaisError {
5242- message,
5243- severity,
5244- state,
5245- arguments,
5246- options,
5247- } => {
5248- write ! ( f, "RAISERROR({message}, {severity}, {state}" ) ?;
5249- if !arguments. is_empty ( ) {
5250- write ! ( f, ", {}" , display_comma_separated( arguments) ) ?;
5251- }
5252- write ! ( f, ")" ) ?;
5253- if !options. is_empty ( ) {
5254- write ! ( f, " WITH {}" , display_comma_separated( options) ) ?;
5255- }
5256- Ok ( ( ) )
5257- }
5258-
52595209 Statement :: List ( command) => write ! ( f, "LIST {command}" ) ,
52605210 Statement :: Remove ( command) => write ! ( f, "REMOVE {command}" ) ,
52615211 Statement :: SetSessionParam ( kind) => write ! ( f, "SET {kind}" ) ,
0 commit comments