File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,18 @@ impl SqlxPostgresConnector {
7878 }
7979 let set_search_path_sql = options. schema_search_path . as_ref ( ) . map ( |schema| {
8080 let mut string = "SET search_path = " . to_owned ( ) ;
81- for ( i, schema) in schema. split ( ',' ) . enumerate ( ) {
82- if i > 0 {
83- write ! ( & mut string, "," ) . unwrap ( ) ;
84- }
85- if schema. starts_with ( '"' ) {
86- write ! ( & mut string, "{schema}" ) . unwrap ( ) ;
87- } else {
88- write ! ( & mut string, "\" {schema}\" " ) . unwrap ( ) ;
81+ if schema. starts_with ( '"' ) {
82+ write ! ( & mut string, "{schema}" ) . unwrap ( ) ;
83+ } else {
84+ for ( i, schema) in schema. split ( ',' ) . enumerate ( ) {
85+ if i > 0 {
86+ write ! ( & mut string, "," ) . unwrap ( ) ;
87+ }
88+ if schema. starts_with ( '"' ) {
89+ write ! ( & mut string, "{schema}" ) . unwrap ( ) ;
90+ } else {
91+ write ! ( & mut string, "\" {schema}\" " ) . unwrap ( ) ;
92+ }
8993 }
9094 }
9195 string
You can’t perform that action at this time.
0 commit comments