@@ -4054,6 +4054,12 @@ pub enum Statement {
40544054 arguments : Vec < Expr > ,
40554055 options : Vec < RaisErrorOption > ,
40564056 } ,
4057+ /// ```sql
4058+ /// PRINT msg_str | @local_variable | string_expr
4059+ /// ```
4060+ ///
4061+ /// See: <https://learn.microsoft.com/en-us/sql/t-sql/statements/print-transact-sql>
4062+ Print ( PrintStatement ) ,
40574063}
40584064
40594065#[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
@@ -5745,7 +5751,7 @@ impl fmt::Display for Statement {
57455751 }
57465752 Ok ( ( ) )
57475753 }
5748-
5754+ Statement :: Print ( s ) => write ! ( f , "{s}" ) ,
57495755 Statement :: List ( command) => write ! ( f, "LIST {command}" ) ,
57505756 Statement :: Remove ( command) => write ! ( f, "REMOVE {command}" ) ,
57515757 }
@@ -9211,6 +9217,19 @@ pub enum CopyIntoSnowflakeKind {
92119217 Location ,
92129218}
92139219
9220+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
9221+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
9222+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
9223+ pub struct PrintStatement {
9224+ pub message : Box < Expr > ,
9225+ }
9226+
9227+ impl fmt:: Display for PrintStatement {
9228+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
9229+ write ! ( f, "PRINT {}" , self . message)
9230+ }
9231+ }
9232+
92149233#[ cfg( test) ]
92159234mod tests {
92169235 use super :: * ;
0 commit comments