pub fn list_tables(config: Config) -> Option<Vec<String>> {
    let mut conn =
        get_connection(config.clone()).expect("Error while trying to connect to mysql database!");

    let select_tables_query = format!(
        "SELECT table_name FROM information_schema.tables
                   WHERE table_schema = '{}';",
        config.database.database_name
    );

    let tables: Vec<String> = conn
        .query(select_tables_query)
        .expect("Error while running select query!");

    return Option::from(tables);
}
/// List all tables for given database
List all tables for given database
List all tables for given database
pub fn list_tables(config: Config) -> Option<Vec<String>> {
    let mut conn =
        get_connection(config.clone()).expect("Error while trying to connect to mysql database!");
    let select_tables_query = format!(
        "SELECT table_name FROM information_schema.tables
                   WHERE table_schema = '{}';",
        config.database.database_name
    );
    let tables: Vec<String> = conn
        .query(select_tables_query)
        .expect("Error while running select query!");
    return Option::from(tables);
}
pub fn list_tables ( config : Config ) -> Option < Vec < String > > { let mut conn = get_connection ( config . clone ( ) ) . expect ( " " ) ; let select_tables_query = format ! ( " " config database database_name ) ; let tables : Vec < String > = conn . query ( select_tables_query ) . expect ( " " ) ; return Option :: from ( tables ) ; }
List all tables for given database
List all tables for given database
config
Config
config
Config