pub fn sanitize_connection_string(conn_str: &str) -> String
Expand description
Removes sensitive information like passwords from connection strings.
This function sanitizes connection strings by removing credentials:
- For URL format (mysql://user:password@host:port/db): Removes everything before ‘@’
- For parameter format (host=localhost password=secret): Removes the password parameter
- For URL format without credentials (mysql://host:port/db): Removes the protocol prefix
§Arguments
conn_str
- The connection string to sanitize
§Returns
A sanitized version of the connection string with sensitive information removed