@@ -40,8 +40,11 @@ use serde::{Deserialize, Serialize};
40
40
#[ cfg( feature = "visitor" ) ]
41
41
use sqlparser_derive:: { Visit , VisitMut } ;
42
42
43
- use crate :: keywords:: Keyword ;
44
43
use crate :: tokenizer:: { Span , Token } ;
44
+ use crate :: {
45
+ display_utils:: { Indent , NewLine } ,
46
+ keywords:: Keyword ,
47
+ } ;
45
48
46
49
pub use self :: data_type:: {
47
50
ArrayElemTypeDef , BinaryLength , CharLengthUnits , CharacterLength , DataType , EnumMember ,
@@ -134,9 +137,9 @@ where
134
137
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
135
138
let mut delim = "" ;
136
139
for t in self . slice {
137
- write ! ( f , "{ delim}" ) ?;
140
+ f . write_str ( delim) ?;
138
141
delim = self . sep ;
139
- write ! ( f , "{t}" ) ?;
142
+ t . fmt ( f ) ?;
140
143
}
141
144
Ok ( ( ) )
142
145
}
@@ -4219,7 +4222,8 @@ impl fmt::Display for Statement {
4219
4222
} => {
4220
4223
write ! ( f, "FLUSH" ) ?;
4221
4224
if let Some ( location) = location {
4222
- write ! ( f, " {location}" ) ?;
4225
+ f. write_str ( " " ) ?;
4226
+ location. fmt ( f) ?;
4223
4227
}
4224
4228
write ! ( f, " {object_type}" ) ?;
4225
4229
@@ -4301,7 +4305,7 @@ impl fmt::Display for Statement {
4301
4305
4302
4306
write ! ( f, "{statement}" )
4303
4307
}
4304
- Statement :: Query ( s) => write ! ( f , "{s}" ) ,
4308
+ Statement :: Query ( s) => s . fmt ( f ) ,
4305
4309
Statement :: Declare { stmts } => {
4306
4310
write ! ( f, "DECLARE " ) ?;
4307
4311
write ! ( f, "{}" , display_separated( stmts, "; " ) )
0 commit comments