sqlx
sqlx copied to clipboard
feat: add get_url to connect options
Add a get_url to ConnectOptions and implement it for all needed types; add get_filename for SqliteConnectOptions. These changes make it easier to test sqlx.
Does your PR solve an issue?
Fixes #2901 Related to #2764
This code uses unwrap on the Url::parse because it seems to me that the internal state of each of the types should always be valid. Let me know if that is not acceptable however, and I could change the response signature to a Result.
See also #2097, another use case for this. Thanks for working on it!