sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

feat: add get_url to connect options

Open lily-mosquitoes opened this issue 2 years ago • 2 comments

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

lily-mosquitoes avatar Nov 26 '23 17:11 lily-mosquitoes

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.

lily-mosquitoes avatar Nov 26 '23 17:11 lily-mosquitoes

See also #2097, another use case for this. Thanks for working on it!

ahcodedthat avatar Feb 02 '24 23:02 ahcodedthat