pub fn extract_database_name(connection_string: &str) -> Option<String>Expand description
Extract database name from MySQL connection string
Parses the connection URL and extracts the database name if present.
§Arguments
connection_string- MySQL connection URL
§Returns
Database name if present in URL, None otherwise
§Examples
assert_eq!(
extract_database_name("mysql://localhost:3306/mydb"),
Some("mydb".to_string())
);
assert_eq!(
extract_database_name("mysql://localhost:3306"),
None
);