@@ -59,7 +59,7 @@ async fn fetch_tables(pool: &MySqlPool, schemas: &[String]) -> Result<Vec<TableI
5959 placeholders. join( "," )
6060 ) ;
6161
62- let mut q = sqlx:: query_as :: < _ , ( String , String , String , String , String , String , u32 , String ) > ( & query) ;
62+ let mut q = sqlx:: query_as :: < _ , ( Vec < u8 > , Vec < u8 > , Vec < u8 > , Vec < u8 > , Vec < u8 > , Vec < u8 > , u32 , Vec < u8 > ) > ( & query) ;
6363 for schema in schemas {
6464 q = q. bind ( schema) ;
6565 }
@@ -69,6 +69,14 @@ async fn fetch_tables(pool: &MySqlPool, schemas: &[String]) -> Result<Vec<TableI
6969 let mut current_key: Option < ( String , String ) > = None ;
7070
7171 for ( schema, table, col_name, data_type, column_type, nullable, ordinal, column_key) in rows {
72+ let schema = String :: from_utf8 ( schema) . expect ( "Could not convert schema name from UTF8 bytes" ) ;
73+ let table = String :: from_utf8 ( table) . expect ( "Could not convert schema name from UTF8 bytes" ) ;
74+ let col_name = String :: from_utf8 ( col_name) . expect ( "Could not convert col_name name from UTF8 bytes" ) ;
75+ let data_type = String :: from_utf8 ( data_type) . expect ( "Could not convert data_type name from UTF8 bytes" ) ;
76+ let column_type = String :: from_utf8 ( column_type) . expect ( "Could not convert column_type name from UTF8 bytes" ) ;
77+ let nullable = String :: from_utf8 ( nullable) . expect ( "Could not convert nullable name from UTF8 bytes" ) ;
78+ let column_key = String :: from_utf8 ( column_key) . expect ( "Could not convert column_key name from UTF8 bytes" ) ;
79+
7280 let key = ( schema. clone ( ) , table. clone ( ) ) ;
7381 if current_key. as_ref ( ) != Some ( & key) {
7482 current_key = Some ( key) ;
0 commit comments